malloc_stats output

Discussion in 'C Programming' started by Amit Gupta, Jun 7, 2007.

  1. Amit Gupta

    Amit Gupta Guest

    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
     
    Amit Gupta, Jun 7, 2007
    #1
    1. Advertising

  2. Amit Gupta

    Default User Guest

    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
     
    Default User, Jun 7, 2007
    #2
    1. Advertising

  3. Amit Gupta

    Richard Bos Guest

    Amit Gupta <> wrote:

    > 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
     
    Richard Bos, Jun 8, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Bentley

    Output / Debug window output bug?

    John Bentley, Sep 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    596
    John Bentley
    Sep 10, 2003
  2. chuck amadi
    Replies:
    1
    Views:
    493
    Larry Bates
    Jun 23, 2004
  3. Paul
    Replies:
    1
    Views:
    430
  4. jmr
    Replies:
    2
    Views:
    338
  5. pratap
    Replies:
    3
    Views:
    462
    James Kanze
    Jul 19, 2007
Loading...

Share This Page