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