On Sat, Jun 27, 2009 at 06:29:33PM +0300, Nikola Vladov wrote:
>
> "2" above is too small.  SHELL_ALIGN is 2*sizeof(void *).
>
> Then we must have
>          buf_size + shell_align + malloc_meta_data <= 512.

shell_align doesn't add anything if the value is already aligned.

> I have tested next and they works OK.
>    MINSIZE (512  -SHELL_ALIGN(sizeof(void*) * 3))
>    MINSIZE (512  -sizeof(void*) * 4)

OK, and you've also tested 512 - sizeof(void *) * 2 to make sure
that it doesn't work? If so we should pick the * 3 variant.
 
> For malloc which uses sbrk (like DL-malloc) the above does not
> help.  In my opinion in this case we have to use
> fist 512, sacond 1024, third 2048, all other 4096 chuks.

Does it hurt though? If not we should just make this unconditional.

PS Please do reply-to-all instead of reply-to-author.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to