Hi SBCL folks,

I'm running into the old "mprotect call failed with ENOMEM"  error, which "probably means that the maximum amount of separate memory mappings was exceeded."

In the past, I was able to solve these problems by tweaking "/proc/sys/vm/max_map_count" and/or "*backend-page-bytes*".  E.g.:
http://article.gmane.org/gmane.lisp.steel-bank.general/2185/match=enomem

I've run into a situation where I can't easily change "/proc/sys/vm/max_map_count" , and I think I've maxed out *backend-page-bytes* at 256k or 1MB or so.

However, rather than a work-around, I'd like to figure out why my code requires so many memory mappings (or why it's stressing SBCL/Linux in the way it is).  The code is dealing with some gnarly data: lots of strings, arrays, and lists.  I'm quite sure that my code is not handling this data optimally/elegantly.  But I'm not sure how to begin debugging this.

So, my question is this: What kinds of Lisp objects cause SBCL to create new memory mappings?  Just strings and arrays?  Also lists?  1 per 4k of cons cells?  Or, if that's not easy to answer, any insight into how/why my code gets into this situation would be helpful.  Thank you.

Happy new year,
Ben


--
Benjamin Lambert
Ph.D. Student of Computer Science
Carnegie Mellon University
Mobile: 617-869-1844