#549: Kill UnionVal
-------------------------+--------------------------------------------------
 Reporter:  whiteknight  |       Owner:          
     Type:  todo         |      Status:  new     
 Priority:  normal       |   Milestone:          
Component:  none         |     Version:          
 Severity:  medium       |    Keywords:  UnionVal
     Lang:               |       Patch:          
 Platform:               |  
-------------------------+--------------------------------------------------

Comment(by jessevdam):

 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. (may be open some other
 tickets, but I mention these thing here so body else in future nows about
 it)

 * Regroup the gc/memory management function into the right *.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 dynamically loading the a gc system
 at startup, so it's easier 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.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/549#comment:7>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to