malloc_stats output

A

Amit Gupta

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
 
D

Default User

Amit said:
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
 
R

Richard Bos

Amit Gupta said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top