apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunter Coelle <gunter.coe...@dbaudio.com>
Subject [PATCH]: alternative implementation apr_hash_first()
Date Wed, 30 Apr 2003 06:24:47 GMT
Karl Fogel wrote:

>Your mailer has wrapped this patch, making it un-applyable.
>Also, you don't include a ChangeLog message or state the purpose of
>the patch anywhere (at least not in this email).  Why does
>apr_hash_first() need a new implementation?
Sorry for inconvienience I might have created.

Ok, lets try again:
Purpose of this patch:
apr_hash_first allocates memory for the iterator struct on
every call (if p!=NULL), before jumping to the first
entry of the table. In applications, where a thread
iterates through the table permanently
(using apr_hash_first() + apr_hash_next()) this will
create memory shortage in the longer run and also
slows down the iteration due to repeating allocations.
This patch is a proposal of separating the allocation
of an iterator and jumping to the first record into two
different functions.


View raw message