On Sun, 15 May 2011, Otto Moerbeek wrote:

> Hi,
> 
> define MALLOC_MAXSHIFT and related stuff more consistently. Also, zap
> region_bits, it is not used.

looks ok. some questions:

> -     struct chunk_head chunk_dir[MALLOC_MAXSHIFT];
> +     struct chunk_head chunk_dir[MALLOC_MAXSHIFT + 1];

Why does this grow? Isn't the MALLOC_MAXSHIFT changes above a noop as far
as the actual values are concerned?

> -     d->regions_bits = 9;
> -     d->regions_free = d->regions_total = 1 << d->regions_bits;
> +     d->regions_free = d->regions_total = 512;

Maybe make this a #define too?

> -     for (i = 0; i < MALLOC_MAXSHIFT; i++)
> +     for (i = 0; i <= MALLOC_MAXSHIFT; i++)

Because of the array size change above?

Reply via email to