logoalt Hacker News

HexDecOctBintoday at 6:41 PM1 replyview on HN

If any SBCL dev is here, please add documentation for how to use the memory arena feature. The only doc is an very old proposal document.


Replies

stackghosttoday at 7:21 PM

Yeah I'm not sure why it's not in the manual, as it's had arena allocation support since at least 2.4.x, but basically:

- use SB-VM:NEW-ARENA to make a new arena

- use SB-VM:WITH-ARENA to redirect ordinary allocation into an existing arena like you would use WITH-OPEN-FILE or similar macros

The only real doc is this internals note, and it doesn't even cover NEW-ARENA which I guess is left as an exercise to the reader: https://github.com/sbcl/sbcl/blob/master/doc/internals-notes...