By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,851 Members | 2,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,851 IT Pros & Developers. It's quick & easy.

malloc_stats output

P: n/a
Hi

I have questions about malloc_stats output? The example output is
attached below..

Arena 0:
system bytes = 135168
in use bytes = 1240
Total (incl. mmap):
system bytes = 135168
in use bytes = 1240
max mmap regions = 0
max mmap bytes = 0
What is the difference between system bytes and in-use bytes?

Is there any way I can get the information about bytes in malloc
freelist. Another useful information would be to get the bytes
allocated as part of overhead (e.g. for size alignment or other
issues)

Thanks

Jun 7 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Amit Gupta wrote:
Hi

I have questions about malloc_stats output? The example output is
attached below..
There's no C function called malloc_stats(). Ask in a newsgroup
appropriate to your platform.


Brian
Jun 7 '07 #2

P: n/a
Amit Gupta <em*******@gmail.comwrote:
I have questions about malloc_stats output? The example output is
attached below..

Arena 0:
system bytes = 135168
in use bytes = 1240
Total (incl. mmap):
system bytes = 135168
in use bytes = 1240
max mmap regions = 0
max mmap bytes = 0
What is the difference between system bytes and in-use bytes?
133928.

Oh, you wanted an explanation of what they mean? Well, system bytes are,
obviously, bytes reserved for the system. This means that they're
avaliable for the OS and the Rung 2 and below libraries, but not for
your programs, which typically run on Rung 4 of the Prerog Ladder. In
use bytes is, unfortunately, a typo in the library; it should be in
use_r_ bytes, and it means bytes left free in the user space (Rung 5 and
above) of the current program. (Luckily, the amounts are actually in
kilobytes, not in bytes. If they weren't, you'd be very nearly out of
memory. Even as it is, if you want to open a large file, you may want to
kick some memory from Rung 4 into user space.)

At least, that's how it is under Arawak LOS 4.0 and higher. If you want
to know what all of the above means on the BBC Model B, ask in
comp.sys.acorn.programmer.

Richard
Jun 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.