Am Sonntag, 22. April 2007 22:47 schrieb Patrick Rutkowski:
> Yes, I see that now, but that doesn't answer the questions.
>
> Why did you choose reg_alloc/8 as an index into free_list?

A granualrity of 8 is of course arbitratly, could be some bigger power of 2 
too.

> Why does the code need to increase the size of free_list so
> dramatically in the branching into the first if()?

Err. If memory for slots up to 8 is allocated and there's a need for 80, then 
the pointer list is (as you have observed) extended by 72 more slote. Next 
allocation size might be for slot 30 or 50 or some such. As the allocation is 
for register space, there's for sure a good chance that the needed allocation 
size has a freelist after some program runtime.

leo

Reply via email to