[Openmcl-devel] Decreasing the size of the reserved heap

Waldek Hebisch hebisch at math.uni.wroc.pl
Fri Jan 10 05:15:50 PST 2014


Gary Byers wrote:
> 
> As I think/hope that I mentioned the other day, Windows will allegedly
> allocate some kernel data structures (page table entries) whose size is
> proportional to the size of region being mapped.  Linux claims to do
> something similar unless the MAP_NORESERVE option is specified.
> 
> Aside from this case (PTEs), essentially no resorces (real or virtual
> memory) are committed in order to describe this reserved memory region
> at this time.  Very soon after this region is created, an image file
> is read or mapped into that memory region and different subregions
> (with different kinds of access permissions) have different costs
> associated with them.  What those costs are and when they're paid can
> get complicated fast and "overcommit" policies can make that even
> more complicated, but until we're asking for resources to be committed
> the fact that they may be speculatively committed or lazily committed
> or otherwise overcommitted isn't really relevant.
>
 
Consider:

bash-3.2$ (ulimit -v $[4*1024*1024] ; /mnt/lv3/fricas/lisp/ccl9/scripts/ccl64)
minimal initial mmap: Cannot allocate memory

While there is no (or only little) real memory in use and no swap
space is reserverd Linux still considers mmap call with MAP_NORESERVE
option as memory allocation which counts toward limit.  So Closure CL
behaviour means that on Linux there is no useful way to limit
memory usage of Closure CL compiled programs.

You may say that this is Linux problem and Closure CL has no
reasonable way to work around.  But saying that there is no
problem is too optimistic...

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 



More information about the Openmcl-devel mailing list