I succeeded in removing the unionval struct from the pmc struct.
I considered the PARROT_GC_IMS, PARROT_GC_GMS, PARROT_GC_INF gc systems as not
working and
dead at the moment. So I did not do any tests on these.
I added a documentation (memory_internals2.pod) file, which give a bit extra
documentation on the memory internals of
the gc system.
The patch I made includes the following items
* Removal of the unionval struct
* The pmc_ext has been removed, it has been intregrated into the pmc struct.
* Major memory leak fix, buffers including strings where never released back by
the gc, only the
headers where released
The initialize_header_pools and associated functions did not set the
pool->gc_object function.
* Added assertion functions for memory system.
* Changes in pmc_freeze.c to keep the used String intact, needed to keep my
assertion function happy
* Updated jit_debug and jit_debug_xcoff to new pobj.h structure
* Renamed the PObj_buf* macros to Buffer_buf*
* Added memory zeroing when creating new pmc header.
In my opinion the following can still to be done.
* Regroup the gc/memory management function into the rigth *.c files
* Make a better split up of the gc system and memory system, the link between
them is not that strong
* (mentioned earlier) Make option of dynamicly loading the a gc system at
startup, so it's easyier to
run some unit test for the different memory systems.
* Make the other gc systems work again
* The data pointed by pmc->data is now allocated via the c allocation system,
but I think we
can get a nice boost if we would use the small object pool system for those pmc
(class) attributes.
I used the assertion code to find some errors, but did not a complete test with
it, it succeeds
with most things, but does not pass every thing. Although the system keeps
running correctly.
So it could be my assertion code misses some exceptions to the rule. But the
code is there
and can be used to search for bugs if the are strange memory system corruptions.
See ticket #549 on trac.
_________________________________________________________________
Windows Liveā¢: Keep your life in sync.
http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev