[interfacekit] Re: Allocator blues

"Graham Gilmore" <grahamg@xxxxxxxxxxxx> wrote:
>
>       *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 :)

You won't see any calls from the BBlockCache to your malloc/free routines,
since the Be BBlockCache is already compiled & linked, and it will directly 
call the routines in libroot.so. If you add your own malloc/free code, only 
your program will call them. 

Another possibility would be to recompile the libroot.so and add your 
debugging code to the malloc/free functions in this library.
The library and instructions how to recompile it is available on any
ftp.be.com mirror.

But why are you doing all this at all? Simply write a test program, to 
see how BBlockCache works, and then do your on implementation of it.

regards
Marcus 

Other related posts: