Multicore processor? Yes.Write program to run in parallel? Yes.Did you remember to use a Scalable Memory Allocator? No? Then read on …In my experience, making sure “memory allocation” for a program is ready for parallelism is an often-overlooked element of making a parallel program work well.
I can show you an incredibly easy way to see if this is a problem for a compiled program (C, C++, Fortran, etc.) – as well as how to fix it.A critical part of any parallel program is scalable memory allocation, which includes use of new as well as explicit calls to malloc, calloc, or realloc. Options include TBBmalloc (Intel Threading Building Blocks), jemalloc, and tcmalloc.

TBBmalloc has a novel “proxy” feature that makes it easy to try in less than 5 minutes on any compiled program.To read this article in full or to leave a comment, please click here

Leave a Reply