Monday, 15 August 2011

c++ - Will dynamic allocations on a different thread slow down my main processing thread? -



c++ - Will dynamic allocations on a different thread slow down my main processing thread? -

i have critical thread processes info in tight loop. affinity bound , meant high-performance processing. no dynamic allocations.

i have thread running on different core none critical work dynamic allocations. affinity bound also.

will presence of other thread doing dynamic allocations impact critical thread?

definitely, yes. not indirect effect of memory layout , l3 trashing, immediate effect 1 time in while. when malloc called tries reuse allocated , freed, has extend process memory space, , calling mmap, or brk. i'm not 100% sure brk, mmap invalidates tlb should expect slower handling of page faults right after these calls. if you're on linux, or *bsd, can seek fiddle kernel code not invalidate in cases, don't expect simple.

c++ multithreading performance low-latency

No comments:

Post a Comment