Changeset 01557b0 in rtems for doc


Ignore:
Timestamp:
11/27/14 10:44:48 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
2c3c657
Parents:
3b4ca3a
git-author:
Sebastian Huber <sebastian.huber@…> (11/27/14 10:44:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/28/14 10:23:53)
Message:

libcsupport: Delete malloc statistics

Use the heap handler statistics instead. Add heap walk option to MALLOC
shell command.

close #1367

Location:
doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/shell/memory.t

    r3b4ca3a r01557b0  
    531531
    532532@example
    533 malloc [info|stats]
     533malloc [walk]
    534534@end example
    535535
    536536@subheading DESCRIPTION:
    537537
    538 This command prints either information or statistics about the
    539 C Program Heap used by the @code{malloc} family of calls based upon
    540 the value of the first argument passed to the command.
    541 
    542 When the subcommand @code{info} is specified, information on the
    543 current state of the C Program Heap is reported.  This includes the following
    544 information:
     538This command prints information about the current state of the C Program Heap
     539used by the @code{malloc()} family of calls if no or invalid options are passed
     540to the command.  This includes the following information:
    545541
    546542@itemize @bullet
     
    553549@end itemize
    554550
    555 When the subcommand @code{stats} is specified, statistics on the
    556 the C Program Heap are reported.  Malloc Family Statistics must
    557 be enabled for all of the values to be updated.  The statistics
    558 available includes the following information:
    559 
    560 @itemize @bullet
    561 @item
    562 @item Currently available memory (in kilobytes)
    563 @item Currently allocated memory (in kilobytes)
    564 @item Maximum amount of memory ever allocated (in kilobytes)
    565 @item Lifetime tally of allocated memory  (in kilobytes)
    566 @item Lifetime tally of freed memory (in kilobytes)
    567 @item Number of calls to @code{malloc}
    568 @item Number of calls to @code{free}
    569 @item Number of calls to @code{realloc}
    570 @item Number of calls to @code{calloc}
    571 @end itemize
     551When the subcommand @code{walk} is specified, then a heap walk will be
     552performed and information about each block is printed out.
    572553
    573554@subheading EXIT STATUS:
     
    577558@subheading NOTES:
    578559
    579 @findex CONFIGURE_MALLOC_STATISTICS
    580 
    581 The @code{CONFIGURE_MALLOC_STATISTICS} @code{confdefs.h} constant
    582 must be defined when the application is configured for the full
    583 set of statistics information to be available.
     560NONE
    584561
    585562@subheading EXAMPLES:
     
    588565
    589566@example
    590 SHLL [/] $ malloc info
     567SHLL [/] $ malloc
    591568Number of free blocks: 3
    592569Largest free block:    3626672
     
    595572Largest used block:    1048
    596573Total bytes used:      10136
    597 SHLL [/] $ malloc stats
    598 Malloc statistics
    599   avail:3552k  allocated:9k (0%) max:10k (0%) lifetime:21k freed:12k
    600   Call counts:   malloc:203   free:93   realloc:0   calloc:20
    601 SHLL [/] $ malloc info
    602 Number of free blocks: 3
    603 Largest free block:    3626672
    604 Total bytes free:      3627768
    605 Number of used blocks: 130
    606 Largest used block:    1048
    607 Total bytes used:      10136
    608 SHLL [/] $ malloc stats
    609 Malloc statistics
    610   avail:3552k  allocated:9k (0%) max:10k (0%) lifetime:23k freed:14k
    611   Call counts:   malloc:205   free:95   realloc:0   calloc:20
    612 @end example
    613 
    614 Note that in the above example, the lifetime allocated and free
    615 values have increased between the two calls to @code{malloc stats}
    616 even though the amount of memory available in the C Program Heap
    617 is the same in both the @code{malloc info} invocations. This indicates
    618 that memory was allocated and freed as a side-effect of the commands.
     574SHLL [/] $ malloc walk
     575malloc walk
     576PASS[0]: page size 8, min block size 48
     577        area begin 0x00210210, area end 0x0FFFC000
     578        first block 0x00210214, last block 0x0FFFBFDC
     579        first free 0x00228084, last free 0x00228354
     580PASS[0]: block 0x00210214: size 88
     581...
     582PASS[0]: block 0x00220154: size 144
     583PASS[0]: block 0x002201E4: size 168, prev 0x002205BC, next 0x00228354 (= last free)
     584PASS[0]: block 0x0022028C: size 168, prev_size 168
     585...
     586PASS[0]: block 0x00226E7C: size 4136
     587PASS[0]: block 0x00227EA4: size 408, prev 0x00228084 (= first free), next 0x00226CE4
     588PASS[0]: block 0x0022803C: size 72, prev_size 408
     589PASS[0]: block 0x00228084: size 648, prev 0x0020F75C (= head), next 0x00227EA4
     590PASS[0]: block 0x0022830C: size 72, prev_size 648
     591PASS[0]: block 0x00228354: size 266157192, prev 0x002201E4, next 0x0020F75C (= tail)
     592PASS[0]: block 0x0FFFBFDC: size 4028711480, prev_size 266157192
     593@end example
    619594
    620595@subheading CONFIGURATION:
  • doc/user/conf.t

    r3b4ca3a r01557b0  
    24332433related configuration parameters supported by
    24342434@code{<rtems/confdefs.h>}.
    2435 
    2436 @c
    2437 @c === CONFIGURE_MALLOC_STATISTICS ===
    2438 @c
    2439 @subsection Enable Malloc Family Statistics
    2440 
    2441 @findex CONFIGURE_MALLOC_STATISTICS
    2442 
    2443 
    2444 @table @b
    2445 @item CONSTANT:
    2446 @code{CONFIGURE_MALLOC_STATISTICS}
    2447 
    2448 @item DATA TYPE:
    2449 Boolean feature macro.
    2450 
    2451 @item RANGE:
    2452 Defined or undefined.
    2453 
    2454 @item DEFAULT VALUE:
    2455 This is not defined by default, and Malloc Statistics are disabled.
    2456 
    2457 @end table
    2458 
    2459 @subheading DESCRIPTION:
    2460 This configuration parameter is defined when the application wishes to
    2461 enable the gathering of more detailed statistics on the C Malloc Family
    2462 of routines.
    2463 
    2464 @subheading NOTES:
    2465 None.
    24662435
    24672436@c
Note: See TracChangeset for help on using the changeset viewer.