sionescu/static-vectors

Do static vectors survive image saving?

phoe opened this issue · 2 comments

phoe commented

I want to allocate a static vector and save a Lisp image, for example, via SBCL's SAVE-LISP-AND-DIE. Can I expect the static vector to still be there after the resulting Lisp image is booted up, or do I need to always reinitialize it after the image is booted?

sb-int:make-static-vector is using sbcl memory, not foreign memory or anything like that. It will persist in a saved core.

No you shouldn't expect that. The current SBCL implementation uses foreign memory, not sb-int:make-static-vector, so you always need to reallocate them on image start.