C++
Example 1: Memory accesses and performance
Example 2: Impact of cache lines
Example 3: L1 and L2 cache sizes
Example 4: Instruction-level parallelism
Example 5: Cache associativity
Example 6: False cache line sharing
Example 7: Hardware complexities
http://igoro.com/archive/gallery-of-processor-cache-effects/
- Kuling's blog
- Odpowiedz
- 6 odsłon
http://channel9.msdn.com/shows/Going+Deep/Silviu-Calinoiu-Inside-Windows-7-Fault-Tolerant-Heap/
http://msdn.microsoft.com/en-us/library/dd744764%28VS.85%29.aspx
- Kuling's blog
- Odpowiedz
- 18 odsłon
- Kuling's blog
- Odpowiedz
- 16 odsłon
- Kuling's blog
- Odpowiedz
- 18 odsłon
1. Set _NT_SYMBOL_PATH to something similiar
_NT_SYMBOL_PATH=srv*d:\pdb_cache*http://msdl.microsoft.com/download/symbols
2. Download LiveKd v 3.12 or higher
http://technet.microsoft.com/en-us/sysinternals/bb897415.aspx
3. Download and install WinDbg (6.11 or higher version)
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#b
4. Copy livekd to directory of WinDbg
(C:\Program Files\Debugging Tools for Windows (x86))
5. Run
livekd -w
6. Have a fun
P.S. If you have problems then temporary disable firewall to allow download symbols from Microsoft symbols server.
http://forum.sysinternals.com/forum_posts.asp?TID=13501&PN=3
- Kuling's blog
- Odpowiedz
- 30 odsłon
- Kuling's blog
- Odpowiedz
- 30 odsłon
$vframe tells you the 'virtual frame pointer'. This is the memory address where you can find the stack frame. If the function has a true stack frame, memory will be layed out like the below table. $vframe is extremely helpful when retail debugging because it tells you where about on the stack to look for your local variables.
http://blogs.msdn.com/greggm/archive/2004/12/15/315673.aspx
The 32-bit x86 calling conventions
http://blogs.msdn.com/oldnewthing/archive/2004/01/08/48616.aspx
The following example shows the results of making a function call using various calling conventions. This example is based on the following function skeleton.
void MyFunc(char c, short s, int i, double f)
MyFunc ('x', 12, 8192, 2.7183);
Nice callstack frame.
http://blogs.msdn.com/oldnewthing/archive/2004/01/16/59415.aspx
- Kuling's blog
- Odpowiedz
- 27 odsłon
Where possible, prefer structured lifetimes: ones that are local, nested, bounded, and deterministic. This is true no matter what kind of lifetime we're considering, including object lifetimes, thread or task lifetimes, lock lifetimes, or any other kind. Prefer scoped locking, using RAII lock-owning objects (C++, C# via using) or scoped language features (C# lock, Java synchronized). Prefer scoped tasks, wherever possible, particularly for divide-and-conquer and similar strategies where structuredness is natural. Unstructured lifetimes can be perfectly appropriate, of course, but we should be sure we need them because they always incur at least some cost in each of code complexity, code clarity and maintainability, and run-time performance. Where possible, avoid slippery spaghetti code, which becomes all the worse a nightmare to build and maintain when the lifetime issues are amplified by concurrency.
http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=221601309
- Kuling's blog
- Odpowiedz
- 39 odsłon
concurrent_queue<T> is very similar to std::queue<T> and it offers push, try_pop interfaces and ‘unsafe’ iterators and size accessors (these aren’t threadsafe during concurrent pushes and pops).
concurrent_vector<T> is most similar to a std::vector<T> and it offers a push_back method that is internally synchronized across threads and allows efficient thread safe growth of the vector. Like std::vector, concurrent_vector has random access iterators, but unlike std::vector, the guarantee of contiguous storage is removed and there are no insert and erase methods.
- Kuling's blog
- Odpowiedz
- 43 odsłony
- Kuling's blog
- Odpowiedz
- 56 odsłon
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- …
- następna ›
- ostatnia »
