[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Liberty-eiffel] GC
From: |
Raphael Mack |
Subject: |
Re: [Liberty-eiffel] GC |
Date: |
Thu, 13 Nov 2014 21:02:32 +0000 |
User-agent: |
Internet Messaging Program (IMP) H5 (6.2.1) |
Hi,
Zitat von Cyril ADRIAN <address@hidden>:
Sorry for the delay but as you can see I don't have a lot of time for
Liberty those days :-(
No problem. You see, I'm also late :-(
2014-10-23 23:06 GMT+02:00 Raphael Mack <address@hidden>:
And could you describe the special handlings for NATIVE_ARRAYs with respect
to garbage collection? - I don't understand the idea behind
LIVE_TYPE_NATIVE_ARRAY_COLLECTOR.
The idea is that when an object is removed from a collection its pointer is
not overridden with NULL. For efficiency reasons, if the GC is not compiled
in (using -no_gc) there should be no performance penalty because of the
extra write.
But when the GC runs it must not mark those pointers as alive; hence the
special feature `mark_native_arrays` that marks each item using the
`mark_item` built-in that the containing collection thinks really is
reachable.
ok, thanks. But yet another question:
in STRING_RECYCLING_POOL.recycle:
1 -- I think there is no need to stop the GC
2 string.recycle
3 recycling_item.set_item(string)
4 if strings.is_empty then
5 strings.add_last(recycling_item)
6 recycling_item := item -- a brand new one (because we
need to reset the weak reference)
7 else
8 i := items_comparator.insert_index(strings, item)
9 if strings.valid_index(i) and then strings.item(i).item =
Void then
isn't "i" in line 8 always "1", as item has capacity 0? Or in other
words: wouldn't item better be recycling_item?
And shouldn't STRING_RECYCLING_ITEM.set_item set capacity := 0 if
a_item = Void?
Mh, digging into this GC issue is soo hard ;-(
Rapha
- Re: [Liberty-eiffel] GC,
Raphael Mack <=