Re: Interpreter memory allocation

2002-02-15 Thread Dan Sugalski
At 11:38 AM -0500 2/15/02, Michael Maraist wrote: >On Fri, 15 Feb 2002, Alex Gough wrote: > >> On Thu, 14 Feb 2002, Dan Sugalski wrote: >> >> > To allocate memory that is GCable, call Parrot_allocate(interpreter, >> > size). Then stash the pointer and size in your buffer header, or >> > it'll

Re: Interpreter memory allocation

2002-02-15 Thread Dan Sugalski
At 2:56 PM + 2/15/02, Alex Gough wrote: >On Thu, 14 Feb 2002, Dan Sugalski wrote: > >> To allocate memory that is GCable, call Parrot_allocate(interpreter, >> size). Then stash the pointer and size in your buffer header, or >> it'll go missing later. To resize a chunk of memory, call >> me

Re: Interpreter memory allocation

2002-02-15 Thread Michael Maraist
On Fri, 15 Feb 2002, Alex Gough wrote: > On Thu, 14 Feb 2002, Dan Sugalski wrote: > > > To allocate memory that is GCable, call Parrot_allocate(interpreter, > > size). Then stash the pointer and size in your buffer header, or > > it'll go missing later. To resize a chunk of memory, call > > mem_r

Re: Interpreter memory allocation

2002-02-15 Thread Alex Gough
On Thu, 14 Feb 2002, Dan Sugalski wrote: > To allocate memory that is GCable, call Parrot_allocate(interpreter, > size). Then stash the pointer and size in your buffer header, or > it'll go missing later. To resize a chunk of memory, call > mem_realloc(interpreter, from, oldsize, newsize). Havin

Interpreter memory allocation

2002-02-14 Thread Dan Sugalski
Okay, I've checked in the final bits needed to do memory allocations and such within Parrot. Here's the scoop. For memory you need to allocate from the system, use mem_sys_allocate. Takes a size, returns a void pointer to the allocated memory. Free it up with mem_sys_free, or it leaks. To res