<div dir="ltr">Dear Marc,<br><br>I see in <a href="https://github.com/gambit/gambit/blob/master/lib/mem.c#L1621-L1636">https://github.com/gambit/gambit/blob/master/lib/mem.c#L1621-L1636</a> that actually ___alloc_scmobj is a wrapper for ___alloc_scmobj_still, great that clarifies that aspect.<br><br>Just curious, when ___ps == NULL it has custom behavior (specifically it will wrap to ___alloc_scmobj_perm instead). In what situation would ___ps ever be NULL?<br><br>Thanks,<br>Phil<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 12, 2020 at 10:01 AM Phillip Suero <<a href="mailto:philsuero@gmail.com">philsuero@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Marc,<div><br>I am sending over an u8vector from the Scheme world to the C world.<br>Of course the u8vector must be still, so that its heap allocated object's memory address is not moved by Gambit's memory system.<br>To get clear on this topic, I have three quick questions for you:<br><br>(1) I see there's the function |##still-copy| in Gambit's runtime.<br>Browsing its code I don't see the keyword ___STILL mentioned anywhere in it. How does it get the ___STILL property, is that an implicit argument to ___alloc_scmobj ?<br><br>(2) Is |##still-copy| a "universal copier" of any heap allocated object, into an equivalent of itself that is ___STILL, so I can use it for, say, u32vector, floating point number, complex number, string, Scheme struct?<br><br>(3) Is there any checker in Gambit's runtime, e.g. a |##still?|, whereby I can check if a heap allocated object is ___STILL already?<br><br>Your clarification is much appreciated, thanks!<br>Phil<br></div></div>
</blockquote></div>