[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
slap_sl_malloc
- To: openldap-devel@OpenLDAP.org
- Subject: slap_sl_malloc
- From: Howard Chu <hyc@symas.com>
- Date: Sat, 28 Aug 2004 17:56:15 -0700
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040714
While I would hate to slow this thing down, it appears we may need to
use a smarter algorithm here. Currently sl_malloc acts like a stack,
objects must be freed in reverse order of allocation otherwise they
remain allocated. I'm seeing a lot of "sl_malloc of XX bytes failed,
using ch_malloc" log messages while watching syncrepl do its thing,
which implies that there is a leak, or objects are not being freed in
the correct order.
I'm not entirely sure there's a leak. But it's very likely that things
aren't being freed in order, and it's difficult to verify a proper order
now. Which implies that we maybe want sl_malloc/sl_free to keep a free
list, coalesce blocks, etc., etc. - all the things a real malloc routine
does.
--
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support