Dan

I have been reading memory.c and resources.c trying to understand how memory
allocation and garbage collection works, and have found what looks to be a
bug.

The initial allocation routine in mem_setup_allocator creates two blocks,
one for the free string header pool and one for the free pmc header pool.
However, Parrot_go_collect copies only the free string header pool to the
newly allocated block (followed by the compacted strings), then proceeds to
free the entire memory pool - what happens to the free pmc header pool??

I have done a simple test by adding a " new P1, PerlInt" to life.pasm in the
middle of the stats output lines, and on my linux x86 system this gives a
segfault, which seems to confirm that something has gone awry somewhere.

--
Peter Gibbs
EmKel Systems


Reply via email to