[D-runtime] Extending pages in GC

Fawzi Mohamed fawzi at gmx.ch
Wed Jul 14 06:04:41 PDT 2010


On 14-lug-10, at 13:40, Steve Schveighoffer wrote:

> [...]
> What I want to have is a function that tries its best to get to  
> maxsize, using
> any means possible, including comitting pages.  I plan to add such
> functionality.  What I'm not sure of is, should I modify the  
> existing functions,
> or add new ones?
>
> My proposed changes would be to add a new extendPagesUpTo(n) (name  
> to be worked
> on) which may extend *up to* n pages, and then modify extend to use  
> this
> function instead.  I don't want to change extendPages(n) because  
> some code may
> rely on the current behavior of returning an error if it cannot  
> extend to *at
> least* n pages.  However, I think extend can be changed because it  
> already is
> expected to return some value between minsize and maxsize or 0 if it  
> couldn't do
> it.
>
> What do you think?

Now I am really replying to this topic :).

Why not adding a function that receives both the min and max (I would  
call it optimal size, because I can imagine case in which that is  
overshooted).

the old function could the simply call the new one with twice the same  
argument.

Fawzi



More information about the D-runtime mailing list