At 4:43 AM -0500 3/26/02, Michel J Lambert wrote: >Am I correct in assuming that the stacks stuff leaks memory? Both stacks.c >and rxstacks.c allocate memory via mem_allocate_aligned, but never free >it, relying on the GC for it (code written before the GC existed). > >Should these stacks be changed to use a buffers system, or should they be >changed to free their own chunks on certain pops? Following the logic in >register.c, which handles it's own memory of register stack chunks, I >would guess the latter, although there might be a performance gain if it >can reuse these chunks via the GC.
While it's a little late as there are stack patches in already, the stack stuff should free its memory when its done with it. (Though I could argue that some sort of stack chunk arena system would be in order. I'm not sure the complexity is warranted,t hough) >Finally, I'd also argue for a renaming or #defining of mem_realloc to >Parrot_reallocate, to match Parrot_allocate. At first glance, I thought >mem_alloc punted down to the native realloc routines, and it was >reallocing GC-managed memory. :) Good point. Yes, we should. -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk