[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: better malloc strategies?
- To: Howard Chu <hyc@symas.com>
- Subject: Re: better malloc strategies?
- From: Pierangelo Masarati <ando@sys-net.it>
- Date: Mon, 04 Sep 2006 09:05:03 +0200
- Cc: openldap-devel@OpenLDAP.org
- In-reply-to: <44EE1BE0.2010509@symas.com>
- References: <44B412B8.7080504@symas.com> <44EE1BE0.2010509@symas.com>
- User-agent: Mail/News 1.5.0.5 (X11/20060808)
Howard Chu wrote:
As a first cut, I plan to recycle Entry and Attribute structures on
our own free lists. That ought to reduce some of the general malloc
contention, as well as some degree of the churn. Will be testing this
in the next few days.
What about a set of macros that implement *_prealloc(), *_alloc(),
*_free() based on the given type? This way, we could save lots of code
duplication and (easily?) extend this to other types. I'm thinking of
the time and fragmentation in libldap when used by the proxy backends...
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati@sys-net.it
------------------------------------------