[Beowulf] large array to run

Mark Hahn hahn at mcmaster.ca
Thu Dec 13 13:13:05 PST 2007


> In C I'd get a return value from malloc (like, NULL in this case, assuming

in C, it depends on the size of the allocation.  in linux, the 
behavior depends on the /proc/vm/overcommit_memory setting:
it can refuse to give you more memory than it has, or the max 
size can be set to swap+ram*/proc/vm/overcommit_ratio or 
(the default setting, overcommit_memory=0) a heuristic that lets
you make absurdly large allocations, as long as you don't touch 
them all...

(it also depends on whether your glibc contains a malloc that 
switches to mmap for large allocations rather than sbrk, etc.)



More information about the Beowulf mailing list