When running my program with valgrind / callgrind I get the following message a lot:
==21734== brk segment overflow in thread #1: can\'t grow to 0x4a39000
Line 1327 from the valgrind source code points to the user manual, "see section Limitations in user manual":
Limits section item 1:
On Linux, Valgrind determines at startup the size of the 'brk segment' using the RLIMIT_DATA rlim_cur, with a minimum of 1 MB and a maximum of 8 MB. Valgrind outputs a message each time a program tries to extend the brk segment beyond the size determined at startup. Most programs will work properly with this limit, typically by switching to the use of mmap to get more memory. If your program really needs a big brk segment, you must change the 8 MB hardcoded limit and recompile Valgrind.