Changeset d006b46d in rtems
- Timestamp:
- 11/28/14 10:53:55 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- e37e8504
- Parents:
- 2c3c657
- git-author:
- Sebastian Huber <sebastian.huber@…> (11/28/14 10:53:55)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (11/28/14 12:09:11)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libmisc/shell/print_heapinfo.c
r2c3c657 rd006b46d 44 44 "Maximum number of free blocks ever: %12" PRIu32 "\n" 45 45 "Maximum number of blocks searched ever: %12" PRIu32 "\n" 46 "Lifetime number of bytes allocated: %12" PRIu64 "\n" 47 "Lifetime number of bytes freed: %12" PRIu64 "\n" 48 "Total number of searches: %12" PRIu32 "\n" 46 49 "Total number of successful allocations: %12" PRIu32 "\n" 47 "Total number of searches ever:%12" PRIu32 "\n"48 "Total number of successful calls to free:%12" PRIu32 "\n"50 "Total number of failed allocations: %12" PRIu32 "\n" 51 "Total number of successful frees: %12" PRIu32 "\n" 49 52 "Total number of successful resizes: %12" PRIu32 "\n", 50 53 s->instance, … … 53 56 s->max_free_blocks, 54 57 s->max_search, 58 s->lifetime_allocated, 59 s->lifetime_freed, 60 s->searches, 55 61 s->allocs, 56 s-> searches,62 s->failed_allocs, 57 63 s->frees, 58 64 s->resizes -
cpukit/score/include/rtems/score/heap.h
r2c3c657 rd006b46d 258 258 typedef struct { 259 259 /** 260 * @brief Lifetime number of bytes allocated from this heap. 261 * 262 * This value is an integral multiple of the page size. 263 */ 264 uint64_t lifetime_allocated; 265 266 /** 267 * @brief Lifetime number of bytes freed to this heap. 268 * 269 * This value is an integral multiple of the page size. 270 */ 271 uint64_t lifetime_freed; 272 273 /** 260 274 * @brief Instance number of this heap. 261 275 */ … … 304 318 305 319 /** 320 * @brief Total number of searches. 321 */ 322 uint32_t searches; 323 324 /** 306 325 * @brief Total number of successful allocations. 307 326 */ … … 309 328 310 329 /** 311 * @brief Total number of searches ever.312 */ 313 uint32_t searches;314 315 /** 316 * @brief Total number of successful calls to free.330 * @brief Total number of failed allocations. 331 */ 332 uint32_t failed_allocs; 333 334 /** 335 * @brief Total number of successful frees. 317 336 */ 318 337 uint32_t frees; -
cpukit/score/src/heapallocate.c
r2c3c657 rd006b46d 255 255 256 256 if ( alloc_begin != 0 ) { 257 /* Statistics */258 ++stats->allocs;259 stats->searches += search_count;260 261 257 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 262 258 … … 269 265 boundary 270 266 ); 267 268 /* Statistics */ 269 ++stats->allocs; 270 stats->searches += search_count; 271 stats->lifetime_allocated += _Heap_Block_size( block ); 272 } else { 273 /* Statistics */ 274 ++stats->failed_allocs; 271 275 } 272 276 -
cpukit/score/src/heapfree.c
r2c3c657 rd006b46d 202 202 ++stats->frees; 203 203 stats->free_size += block_size; 204 stats->lifetime_freed += block_size; 204 205 205 206 return( true ); -
doc/shell/memory.t
r2c3c657 rd006b46d 552 552 @item Maximum number of free blocks ever 553 553 @item Maximum number of blocks searched ever 554 @item Lifetime number of bytes allocated 555 @item Lifetime number of bytes freed 556 @item Total number of searches 554 557 @item Total number of successful allocations 555 @item Total number of searches ever556 @item Total number of successful calls to free558 @item Total number of failed allocations 559 @item Total number of successful frees 557 560 @item Total number of successful resizes 558 561 @end itemize … … 576 579 SHLL [/] $ malloc 577 580 C Program Heap and RTEMS Workspace are the same. 578 Number of free blocks: 14579 Largest free block: 266 157192580 Total bytes free: 266 164928581 Number of free blocks: 2 582 Largest free block: 266207504 583 Total bytes free: 266208392 581 584 Number of used blocks: 167 582 Largest used block: 16 424583 Total bytes used: 90888585 Largest used block: 16392 586 Total bytes used: 83536 584 587 Instance number: 0 585 Size of the allocatable area in bytes: 266255816 586 Minimum free size ever in bytes: 266156136 587 Maximum number of free blocks ever: 15 588 Maximum number of blocks searched ever: 15 588 Size of the allocatable area in bytes: 266291928 589 Minimum free size ever in bytes: 266207360 590 Maximum number of free blocks ever: 6 591 Maximum number of blocks searched ever: 5 592 Lifetime number of bytes allocated: 91760 593 Lifetime number of bytes freed: 8224 594 Total number of searches: 234 589 595 Total number of successful allocations: 186 590 Total number of searches ever: 186591 Total number of successful calls to free:19596 Total number of failed allocations: 0 597 Total number of successful frees: 19 592 598 Total number of successful resizes: 0 593 599 SHLL [/] $ malloc walk
Note: See TracChangeset
for help on using the changeset viewer.