Re: branch-1_4 allocation overflow

"Gary V. Vaughan" <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
-----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      ())_.  [email protected]
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-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.