mallinfo() in FreeBSD

Hi!

Still porting a Linux C++ application to FreeBSD. There's one function that uses mallinfo() to determine how much RAM is available and how much is used. The implementation is:
Code:
        struct mallinfo memstats = mallinfo( );
        Msg( "sbrk size: %.2f MB, Used: %.2f MB, #mallocs = %d\n",
                 memstats.arena / ( 1024.0 * 1024.0), memstats.uordblks / ( 1024.0 * 1024.0 ), memstats.hblks );

But as I can see, mallinfo is not present in FreeBSD libc. So the question is - is there's any way to implement this function in FreeBSD?
 
Back
Top