[D-runtime] Extending pages in GC

Steve Schveighoffer schveiguy at yahoo.com
Wed Jul 14 06:05:17 PDT 2010


OK, I agree about the sub-page sizes (I do not use newCapacity in those cases, 
and newCapacity actually has a guard against that).

I like the uprounding, it's probably the better method than what currently 
happens.  I'll try to incorporate that.

Your reply went to the list, it was just delayed until after this one came 
through :)  Not sure why that happened...

-Steve



>
>From: Fawzi Mohamed <fawzi at gmx.ch>
>To: D's runtime library developers list <d-runtime at puremagic.com>
>Sent: Wed, July 14, 2010 8:57:29 AM
>Subject: Re: [D-runtime] Extending pages in GC
>
>
>
>On 14-lug-10, at 14:34, Steve Schveighoffer wrote:
>
>Hm... did you mean to reply to the newCapacity message?
>>
>>Even if that is the case, I don't really understand what you are saying 
here...
>>
>>-Steve
>>
>>Sorry, I had written a first reply to the newCapacity message, and it seems that 
>>that first reply for unknown reasons did not go through to the list... so my 
>>second reply was indeed without context...

as It was not really correct, I just put here an excerpt for completeness sake
------
Again I am not too sure, I flip flopped a couple of times 
implementing http://github.com/fawzi/blip/blob/master/blip/util/Grow.d , a 
version of which I had also used in tango.

basically if you append to an array do you want the appending be determined by 
the number of elements of the array, or its size?
Code will probably work depending on the number of elements of the array, not on 
its memory usage.
In the end it is just a factor, but if you have many small elements I feel that 
it if "reasonable" to allocate a smaller amount of extra space.
On the other hand as you pointed out if you thing strictly from the memory point 
of view, one can argue that the percentile of extra space should depend only on 
the space used, not on how it is used internally.

Finally I kept the "per element" view, but that was done without any real 
testing


(in reality I grow strictly on memory and the use the element size to round up, 
guaranteeing nice behavior for arrays with few large elements).
--------

about the sub page grows I am not sure if I agree, choosing those special sizes 
matches the sizes of the bins in the GC, so it makes sense to have special sizes

>
>----- Original Message ----
>
>From: Fawzi Mohamed <fawzi at gmx.ch>
>>
To: D's runtime library developers list <d-runtime at puremagic.com>
>
Sent: Wed, July 14, 2010 8:20:46 AM
>
Subject: Re: [D-runtime] Extending pages in GC
>

>
ehm, it seems that it was too long ago that I worked on that code.
>
Indeed I  flip-flopped one more time it seem, and I also decided to grow only 
>
based on  memory usage.
>
The element size is used just to round the result to a multiple  of the element 
>
size...
>
(this can have a large impact with arrays with few  large elements, I think it 
>
is  correct)
>

>
Fawzi
>
_______________________________________________
>
D-runtime  mailing list
>
D-runtime at puremagic.com
>
http://lists.puremagic.com/mailman/listinfo/d-runtime
>

>


_______________________________________________
D-runtime mailing list
D-runtime at puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime

>


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d-runtime/attachments/20100714/2a35b5ac/attachment.html>


More information about the D-runtime mailing list