help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Large objects


From: Gwenaël Casaccio
Subject: Re: [Help-smalltalk] Large objects
Date: Fri, 30 Mar 2012 12:10:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0

On 30/03/2012 11:03, Paolo Bonzini wrote:
Il 30/03/2012 10:53, Gwenaël Casaccio ha scritto:
Hi,

Here is a patch that allocate large objects on the fixed space,
it improves the gc compact steps by making them fixed.
You also made them young in a patch that was reverted a while ago
(commit c51f7d2, do not automatically tenure large objects).  Can this
be reapplied with the grey pages fix?

I think I would apply that patch as a first step, as I've said on irc the fixed
objects in the new generation are scanned twice, first time
during the grey page scanning and after during the cheney
scan. And they are only freed during the sweep steps.
But as you've correctly said they are not scanned if they are byte objects.

A solution is to avoid - only when scavenge - to visit the fixed objects
but to tag them; after the untaged one are added in a queue and free
at the end of the scavenge. But step by step the gc is a complex
and fragile piece of code!

The patch is tested with the following code (from Ladislav Marek thanks :-)
and make check:

set := WeakSet new.
set2 := WeakSet new.

1 to: 80000 do: [ :i |
    obj := Object new.

    set add: obj.
    set2 add: obj.

    obj := nil.
].

I've also changed the basicFixedNew and basicFixedNewWith
primitives. They allocate directly objects on the fixed space
unlike the old implementation that allocate them and move them
in the fixed space.
This should be a separate patch.  I think indirect function calls hurt
on a fast path.

Thanks

Paolo

_______________________________________________
help-smalltalk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Attachment: allocatorFixed.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]