Hi, Neil Jerram <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] (Ludovic Courtès) writes: > >> unless otherwise specified, every register and every piece of memory >> is scanned for pointers, not only the heap (however, only heap >> regions allocated via the GC allocation routines are scanned). > > I wonder if this is the main cause of BGC not performing as well as > Guile's own GC? BGC ends up scanning more memory than Guile, of course. However... > Guile's own GC knows, for example, that there's no > point scanning the characters of a string, or the elements of a > uniform vector, and that SMOB memory looks after itself. Does BGC > give us any way to feed this kind of information in, so that BGC could > avoid such scans in the same way Guile's GC does? ... As explained in my original post, BGC provides a function to allocate memory that must _not_ be scanned (namely `GC_MALLOC_ATOMIC'). In my post, I mentioned that I wrapped this feature in `scm_gc_malloc_pointerless ()' so that one can use it, for instance, to allocate stringbufs. BGC also allows one to describe more complex "scanning" patterns. For instance, in order to implement weak-car pairs, one has to tell BGC to not scan the first word of the pair (since otherwise the object pointed to by the car would always remain unreachable). But please, relax about performance, we still haven't run any meaningful benchmark. ;-) Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel