m4-patches
[Top][All Lists]
Advanced

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

Re: branch-1_4 allocation overflow


From: Gary V. Vaughan
Subject: Re: branch-1_4 allocation overflow
Date: Wed, 1 Nov 2006 21:28:57 -0600

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

Hey Eric,

On 26 Oct 2006, at 18:18, Eric Blake wrote:
Eric Blake <ebb9 <at> byu.net> writes:
On head, I wonder if it would be nicer to use a sorted list of active
diversions, rather than allocating such a sparse array, so that memory is
only allocated for used diversions.

Here's the two-part patch I am using for head. First I optimized the data representation, and got rid of a number of potential size_t-to-int bugs on 64- bit platforms. The second part pulls in a gnulib list structure, to convert
the sparse array into an efficient AVL tree.

Nice! I remember thinking about doing something similar in the pre- gnulib
days, but was exhausted after writing the hash ADT and forgot about it.

Cheers,
        Gary
- --
Gary V. Vaughan      ())_.  address@hidden
Research Scientist   ( '/   http://blog.azazil.net
GNU Hacker           / )=   http://www.gnu.org/software/{libtool,m4}
Technical Author   `(_~)_   http://sources.redhat.com/autobook




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFSWX9FRMICSmD1gYRAjp7AKDPyvOc1XXSv4/eacqvHF3SpAbLVwCfV0mm
HmkydbLJhywO4Vqfv8cXsLY=
=3eHP
-----END PGP SIGNATURE-----




reply via email to

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