Lisp HUG Maillist Archive

load a fasl file from memory

Is it possible to load a fasl file from memory like a vector of bytes? Or in general: is it possible to use the load function in LW to load data (source code/fasl) not from a file, but from memory?

Best,
 Art


RE: load a fasl file from memory

Hi Art,


You can memory map a file, in which the contents are made available directly to memory without having to be directly loaded. A fasl is just a binary file like any other, so you could certainly map it. I'm not aware of this being something you can do directly in Lisp, so you'd have to resort to the FLI. Is that the kind of thing you want? There is a simple memory mapper in Edi Weitz's lw-win library (Windows-specific, non-portable):



http://weitz.de/lw-win/


Best,
Christopher

> Date: Thu, 1 Mar 2012 13:24:00 -0800
> From: artobrezan@yahoo.com
> Subject: load a fasl file from memory
> To: lisp-hug@lispworks.com
>
>
>
> Is it possible to load a fasl file from memory like a vector of bytes? Or in general: is it possible to use the load function in LW to load data (source code/fasl) not from a file, but from memory?
>
> Best,
> Art
>
Updated at: 2020-12-10 08:36 UTC