[Issue 3463] Integrate Precise Heap Scanning Into the GC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 13 21:55:19 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=3463


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com


--- Comment #87 from Walter Bright <bugzilla at digitalmars.com> 2011-04-13 21:51:35 PDT ---
The idea, as I understand it, is to supply a bit mask of where the pointers
are. For me, the difficulties are:

1. distinguishing real pointers from might-be-a-pointer (such as you might get
from union { int a; void* p; }).

2. large static arrays, large structs/classes, structs with large static array
members, etc.

The amount of static data dedicated to such bit arrays could get very large.

I see two solutions:

1. if it is case (1) or (2), give up for that type and revert to the current
method of scanning that object

2. devise a 'state machine' instead that the gc executes for a type. The state
machine has instructions like "advance n bytes to the next pointer" and "the
next pointer is ambiguous" and "execute the following sequence n times."

I don't see an obvious choice which is better.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list