Hi Kashyap, > Is the allocated memory purged by the GC in your example? If not, would it > be straightforward to plug it in a manner that the GC handles the free?
No, this is not possible. The native call to malloc() is completely unknown to the Lisp interpreter, and outside the data structures (a heap of cells) it controls. That's why I recommend the second option using 'buf': : (buf P 99 (byte P 65) (byte (inc P) 0) (struct P 'S) ) -> "A" The free() call is avoided, and the (stack-) memory is guaranteed to be released even if for example the execution context is exited via 'throw' or an error. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe