[interfacekit] Allocator blues
- From: "Graham Gilmore" <grahamg@xxxxxxxxxxxx>
- To: "Interface Kit List" <interfacekit@xxxxxxxxxxxxx>
- Date: Fri, 15 Feb 2002 00:43:23 -0500
*sigh*
I've poked at all sorts of things trying to figure out what Be's
BBlockCache is doing behind the scenes with its memory, but without any
success. I overrode the default malloc/realloc/free functions with my
own versions (they output some debug stuff to the console, and use new
[]/delete [] instead :), and I can see my own BBlockCache implementation
making malloc() calls, but Be's implementation seems to be malloc-free,
if you'll pardon the pun :)
I built a static library which included libbe.so and a small function
that references BBlockCache, and used 'nm' on it to see what symbols
were undefined. The only other undefined symbol (besides malloc,free,
etc.) that was listed that seemed remotely memory-related was one called
"__eh_alloc", though my hunch is that has something to do with c++
exception handling (I could be wrong?), so I'm kinda stuck as to what
else the class might be doing. If nothing else, I'm learning a fair bit
about memory allocation and poking around object files :)
I suppose it could be using new & delete ALL the time (which would be
downright deceitful, given the API offers B_MALLOC_CACHE and
B_OBJECT_CACHE cache types)... I'll try replacing operator new() and
operator delete() (probably with ones that call malloc/free ;) and see
where that gets me.
If anyone has any other suggestions, tips, or whatever, I'm open :)
Graham
- Follow-Ups:
- [interfacekit] BBitmap allocation
- From: DarkWyrm
Other related posts:
- » [interfacekit] Allocator blues
- » [interfacekit] Re: Allocator blues
- » [interfacekit] Re: Allocator blues
- [interfacekit] BBitmap allocation
- From: DarkWyrm