On Wed, Oct 19, 2011 at 04:31:48PM +0300, Laurynas Biveinis wrote: > In the end I believe that it is the patches that talk. Whatever > patches are going to be submitted, reviewed and accepted, that is > going to be GCC's future, be it memory management, or something els
I was beginning to work on a patch to add finalizable (that is destroyable) objects to Ggc. So I understand you Laurynas suggest that it might be worth working on it (while I percieved most other emails, e.g. Ian's or Duncan's messages, as a hint to avoid losing my time). In http://gcc.gnu.org/ml/gcc/2011-10/msg00274.html I wrote: ##### implementation tricks First, I am looking into gcc/ggc-zone.c and I feel that each page entry should have some destructor related data (which may be cleared if no destructor is involved). For large_page_entry each large object has such a page [one page per large object], and the page can easily contain a function pointer to the destructor. For small_page_entry which contains several chunks for several objects, I have the feeling that we would have an array of destructor function pointers (or null). I am not sure to understand the exact role of alloc_bits in small_page_entry structure. I believe that a bit is set there only for start address of each object, not for the entire range of the object. Could someone confirm my understanding please? With gcc/ggc-page.c I believe we should have an array of destructors inside the page_entry structures. ############ Laurynas & others, do you understand precisely the role of alloc_bits? Is a bit set for every machine word (or some elementary allocation unit) which is used, or is it set only for the first word? Do you think I should add some finalization related data to small_page_entry, or do you suggest I need yet another kind of page_entry, e.g. a finalizable_page_entry (for rather "small" finalized Ggc objects).? Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***