-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Rainer Deyke wrote:
> On 4/1/2010 15:22, div0 wrote:
>> You can't easily or reasonably find the bits of the stack used by D
>> code, so you can't scan the stack, and therefore you can't move any object.
>
> You could, if D was modified to register the
On 4/1/2010 15:22, div0 wrote:
> You can't easily or reasonably find the bits of the stack used by D
> code, so you can't scan the stack, and therefore you can't move any object.
You could, if D was modified to register the parts of the stack that it
uses in some sort of per-thread stack registry.
On Thu, 01 Apr 2010 18:58:47 +0100, div0
wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Justin Spahr-Summers wrote:
> > On Wed, 31 Mar 2010 22:59:08 -0400, bearophile
> >>
> >> Bye,
> >> bearophile
> >
> > I think the D2 spec puts restrictions on what you can do with GC-
> > a
div0:
> You can't easily or reasonably find the bits of the stack used by D
> code, so you can't scan the stack, and therefore you can't move any object.
>
> Throw threading into the mix and your stacks get even more complicated.
Thank you for your explanation, I have to learn more. In two years
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
bearophile wrote:
> div0:
>> The trouble with a moving garbage collector is that you have to be able
>> to accurately scan the stacks of all threads. This is difficult to do
>> with a language that can arbitrarily call into functions provided by
>> dif
div0:
> The trouble with a moving garbage collector is that you have to be able
> to accurately scan the stacks of all threads. This is difficult to do
> with a language that can arbitrarily call into functions provided by
> different languages for which the compiler won't and can't have stack
> la
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Justin Spahr-Summers wrote:
> On Wed, 31 Mar 2010 22:59:08 -0400, bearophile
>>
>> Bye,
>> bearophile
>
> I think the D2 spec puts restrictions on what you can do with GC-
> allocated pointers (can't convert them to integers, can't perform
> arithme
Justin Spahr-Summers:
> But shouldn't the GC know the size of Foo instances?
Yes, if Foo is a class instance.
>It seems like it should be able to rewrite any GC-managed pointers that point
>to 'f' or anywhere inside it.<
Maybe it can be done, but in a system language it can become a mess, bet
pinned classes can't contain pointers to their fields or to unpinned
> memory, in a transitive way. They can contain pointers to pinned memory.
>
> In system (unsafe) modules you can of course cast a unpinned class referent
> to a pointer, but this is nearly, because the GC can
On Thu, 01 Apr 2010 05:27:55 -0400, bearophile
wrote:
>
> Justin Spahr-Summers:
> > I think the D2 spec puts restrictions on what you can do with GC-
> > allocated pointers (can't convert them to integers, can't perform
> > arithmetic on them outside of their bounds, etc.), and I think they're
Justin Spahr-Summers:
> I think the D2 spec puts restrictions on what you can do with GC-
> allocated pointers (can't convert them to integers, can't perform
> arithmetic on them outside of their bounds, etc.), and I think they're
> restrictive enough that a copying garbage collector could work w
ystem (unsafe) modules you can of course cast a unpinned class referent
> to a pointer, but this is nearly, because the GC can move the class in memory
> in any moment. It can be useful for a short time if you disable the GC.
>
> Pinned classes act as now, they can contain pointers t
s or to unpinned
memory, in a transitive way. They can contain pointers to pinned memory.
In system (unsafe) modules you can of course cast a unpinned class referent to
a pointer, but this is nearly, because the GC can move the class in memory in
any moment. It can be useful for a short time if you d
13 matches
Mail list logo