Re: destruction of GTY() data

2006-12-09 Thread Basile STARYNKEVITCH
O, Sat, Dec 09, 2006 at 11:03:21AM -0500, Daniel Berlin écrivait/wrote: > On 12/9/06, Basile STARYNKEVITCH <[EMAIL PROTECTED]> wrote: > >Le Fri, Dec 08, 2006 at 07:09:23PM -0500, Daniel Berlin écrivait/wrote: > > > >> You see, we currently waste a lot of memory to avoid the fact that our > >> GC is

Re: destruction of GTY() data

2006-12-09 Thread Daniel Berlin
On 12/9/06, Basile STARYNKEVITCH <[EMAIL PROTECTED]> wrote: Le Fri, Dec 08, 2006 at 07:09:23PM -0500, Daniel Berlin écrivait/wrote: > You see, we currently waste a lot of memory to avoid the fact that our > GC is very slow. > We still take it on the chin when it comes to locality. Previous > th

Re: destruction of GTY() data

2006-12-09 Thread Basile STARYNKEVITCH
Le Fri, Dec 08, 2006 at 07:09:23PM -0500, Daniel Berlin écrivait/wrote: > > Uh, well, you see, there are points in between these two extremes. > Most commercial compilers are not garbage collected, they rely on > allocation pools (ie multiple heap) to get sane performance and > lifetime managemen

Re: destruction of GTY() data

2006-12-08 Thread Daniel Berlin
I'm not sure to understand what Daniel suggests. If he dreams of a better memory handling than the current GGC, I certainly agree; I actually dream of a GCC future compiler where every data is garbage collected in a copying generational scheme (see my Qish experiment). This would require some prep

Re: destruction of GTY() data

2006-12-08 Thread Basile STARYNKEVITCH
Le Sat, Dec 09, 2006 at 12:08:09AM +0100, basile écrivait/wrote: > On Tue, Dec 05, 2006 at 09:06:13PM +0100, I (Basile) wrote in > http://gcc.gnu.org/ml/gcc/2006-12/msg00158.html > > > > > I want to have a GTY() garbage collected structure such that, when it > > is destroyed, some specific routin

Re: destruction of GTY() data

2006-12-08 Thread Basile STARYNKEVITCH
On Tue, Dec 05, 2006 at 09:06:13PM +0100, I (Basile) wrote in http://gcc.gnu.org/ml/gcc/2006-12/msg00158.html > > I want to have a GTY() garbage collected structure such that, when it > is destoyed, some specific routine is called (this should indeed be > possible, since GGC is a mark& sweep garb

Re: destruction of GTY() data

2006-12-05 Thread Daniel Berlin
On 12/5/06, Basile STARYNKEVITCH <[EMAIL PROTECTED]> wrote: Hello I am not sure to understand what if_marked or deletable means in GTY context http://gcc.gnu.org/onlinedocs/gccint/GTY-Options.html http://gcc.gnu.org/wiki/Memory_management I want to have a GTY() garbage collected structure such

Re: destruction of GTY() data

2006-12-05 Thread Laurynas Biveinis
I am not sure to understand what if_marked or deletable means in GTY context "Deletable" just sets the pointer to NULL on garbage collection, in practice making it a weak pointer. "If_marked" provides a callback for a bit more sophisticated weak pointers, so that an user-provided routine can tel

Re:: destruction of GTY() data

2006-12-05 Thread Zack Weinberg
I want to have a GTY() garbage collected structure such that, when it is destoyed, some specific routine is called (this should indeed be possible, since GGC is a mark& sweep garbage collector, which delet individually each dead data). if_marked and deletable are not what you want; they are two