<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt">OK, I agree about the sub-page sizes (I do not use newCapacity in those cases, and newCapacity actually has a guard against that).<br><br>I like the uprounding, it's probably the better method than what currently happens. I'll try to incorporate that.<br><br>Your reply went to the list, it was just delayed until after this one came through :) Not sure why that happened...<br><br>-Steve<br><div><br></div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><b><span style="font-weight: bold;">From:</span></b> Fawzi Mohamed <fawzi@gmx.ch><br><b><span
style="font-weight: bold;">To:</span></b> D's runtime library developers list <d-runtime@puremagic.com><br><b><span style="font-weight: bold;">Sent:</span></b> Wed, July 14, 2010 8:57:29 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [D-runtime] Extending pages in GC<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off"><br><div><div><div><div>On 14-lug-10, at 14:34, Steve Schveighoffer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hm... did you mean to reply to the newCapacity message?<br><br>Even if that is the case, I don't really understand what you are saying here...<br><br>-Steve<br><br></div></blockquote>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...<div><br></div><div>as It was not really correct, I just put here an excerpt for completeness sake</div><div>------</div><div><span>Again I am not too sure, I flip flopped a couple of times implementing <a target="_blank" href="http://github.com/fawzi/blip/blob/master/blip/util/Grow.d">http://github.com/fawzi/blip/blob/master/blip/util/Grow.d</a> , a version of which I
had also used in tango.</span><br><br>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?<br>Code will probably work depending on the number of elements of the array, not on its memory usage.<br>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.<br>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.<br><br>Finally I kept the "per element" view, but that was done without any real testing<br><blockquote type="cite"></blockquote></div><div><br></div><div>(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).</div><div>--------</div><div><br></div><div>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</div><blockquote type="cite"><div><br><br>----- Original Message ----<br><blockquote type="cite">From: Fawzi Mohamed <<a rel="nofollow" ymailto="mailto:fawzi@gmx.ch" target="_blank" href="mailto:fawzi@gmx.ch">fawzi@gmx.ch</a>><br></blockquote><blockquote type="cite">To: D's runtime library developers list <<a rel="nofollow" ymailto="mailto:d-runtime@puremagic.com" target="_blank" href="mailto:d-runtime@puremagic.com">d-runtime@puremagic.com</a>><br></blockquote><blockquote type="cite">Sent: Wed, July 14, 2010 8:20:46 AM<br></blockquote><blockquote type="cite">Subject: Re: [D-runtime] Extending pages in GC<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">ehm, it seems that it was too long ago that I
worked on that code.<br></blockquote><blockquote type="cite">Indeed I flip-flopped one more time it seem, and I also decided to grow only <br></blockquote><blockquote type="cite">based on memory usage.<br></blockquote><blockquote type="cite">The element size is used just to round the result to a multiple of the element <br></blockquote><blockquote type="cite">size...<br></blockquote><blockquote type="cite">(this can have a large impact with arrays with few large elements, I think it <br></blockquote><blockquote type="cite">is correct)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Fawzi<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">D-runtime mailing list<br></blockquote><blockquote type="cite"><a rel="nofollow" ymailto="mailto:D-runtime@puremagic.com" target="_blank"
href="mailto:D-runtime@puremagic.com">D-runtime@puremagic.com</a><br></blockquote><blockquote type="cite"><span><a target="_blank" href="http://lists.puremagic.com/mailman/listinfo/d-runtime">http://lists.puremagic.com/mailman/listinfo/d-runtime</a></span><br></blockquote><blockquote type="cite"><br></blockquote><br><br><br>_______________________________________________<br>D-runtime mailing list<br><a rel="nofollow" ymailto="mailto:D-runtime@puremagic.com" target="_blank" href="mailto:D-runtime@puremagic.com">D-runtime@puremagic.com</a><br><span><a target="_blank" href="http://lists.puremagic.com/mailman/listinfo/d-runtime">http://lists.puremagic.com/mailman/listinfo/d-runtime</a></span><br></div></blockquote></div><br></div></div><meta http-equiv="x-dns-prefetch-control" content="on"></div></div></blockquote>
</div><br>
</body></html>