> So if I was hitting this limit then I should see no / very few gaps, in the
> /proc/<pid>/maps. Is that true?
It usually fails when malloc() hits your libraries. One solution is to
recompile the kernel with a higher TASK_UNMAPPED_BASE (should be a sysctl,
but is a fixed define currently). That would force the shared libraries
to start at a higher address and give sbrk() more breathing space.
Another way is to use mallopt(M_MMAP_THRESHOLD, ..) and set a low mmap
threshold. This allows malloc to use mmap earlier instead of sbrk() and skip
the shared library area. It comes at a cost thought, malloc() tends to
become more expensive.
With some more changes you can also force the user space to 3.5GB, at the
cost of much less kernel memory. It usually makes sense to change
TASK_UNMAPPED_BASE with this.
-Andi
P.S.: I'm pretty sure this is a FAQ.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/