bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI - bash crash due to asprintf bug


From: Eric Blake
Subject: Re: FYI - bash crash due to asprintf bug
Date: Wed, 29 Nov 2006 20:49:37 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paul Eggert on 11/29/2006 11:03 AM:
> Eric Blake <address@hidden> writes:
> 
>>> See http://tinyurl.com/yd5669 for details.
>> This message on the cygwin list has a good point,
> 
> For first-fit memory allocators, perhaps; but these are ancient
> technology and I wouldn't worry about x2nrealloc on their account.

Hmm, further reading in that thread from the tinyurl agrees that locking
in the ratio is not a good idea if you don't also know the malloc behavior
- - one poster reported that performance between 1.3 and 1.6 is one good
range (ie. less than the golden ratio phi, but high enough that
exponential growth happens in a reasonable amount of time), but that an
even better range came as he adjusted the ratio closer to 2.7 (ie. the
natural logarithm).  Short of some actual benchmarks, which take into
account the ability of modern malloc to use MMU to efficiently realloc
anything larger than a page size by remapping the memory rather than
copying data, I'm becoming more and more reluctant to change away from the
current 2.0 ratio without hard evidence, and I'm not willing to spend the
time trying to build the benchmark.  Perhaps it would make a good thesis
paper for some student?

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFblTR84KuGfSFAYARAgiUAJ9l8dduYAL5FuuP2F6WdE7Wy5In6gCgkFc+
k+16BsAG+djA9rqxwB9fskY=
=ITfJ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]