Changeset c58ead7
- Timestamp:
- Sep 11, 2023, 12:12:17 PM (20 months ago)
- Branches:
- master
- Children:
- 73d0a84c
- Parents:
- 5cfb8b1
- Location:
- libcfa/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/heap.cfa ¶
r5cfb8b1 rc58ead7 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 2 18:48:30 202313 // Update Count : 161 412 // Last Modified On : Mon Sep 11 11:21:10 2023 13 // Update Count : 1615 14 14 // 15 15 … … 691 691 return stats; 692 692 } // collectStats 693 694 static inline void clearStats() { 695 lock( mgrLock ); 696 697 // Zero the heap master and all active thread heaps. 698 HeapStatisticsCtor( heapMaster.stats ); 699 for ( Heap * heap = heapMaster.heapManagersList; heap; heap = heap->nextHeapManager ) { 700 HeapStatisticsCtor( heap->stats ); 701 } // for 702 703 unlock( mgrLock ); 704 } // clearStats 693 705 #endif // __STATISTICS__ 694 706 … … 1556 1568 1557 1569 1570 // Zero the heap master and all active thread heaps. 1571 void malloc_stats_clear() { 1572 #ifdef __STATISTICS__ 1573 clearStats(); 1574 #else 1575 #define MALLOC_STATS_MSG "malloc_stats statistics disabled.\n" 1576 if ( write( STDERR_FILENO, MALLOC_STATS_MSG, sizeof( MALLOC_STATS_MSG ) - 1 /* size includes '\0' */ ) == -1 ) { 1577 abort( "**** Error **** write failed in malloc_stats" ); 1578 } // if 1579 #endif // __STATISTICS__ 1580 } // malloc_stats_clear 1581 1582 1558 1583 // Changes the file descriptor where malloc_stats() writes statistics. 1559 1584 int malloc_stats_fd( int fd __attribute__(( unused )) ) libcfa_public { -
TabularUnified libcfa/src/heap.hfa ¶
r5cfb8b1 rc58ead7 10 10 // Created On : Tue May 26 11:23:55 2020 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 4 19:08:55 202213 // Update Count : 2 312 // Last Modified On : Mon Sep 11 11:18:18 2023 13 // Update Count : 24 14 14 // 15 15 … … 43 43 size_t malloc_mmap_start(); // crossover allocation size from sbrk to mmap 44 44 size_t malloc_unfreed(); // heap unfreed size (bytes) 45 void malloc_stats_clear(); // clear heap statistics 45 46 } // extern "C" 46 47
Note: See TracChangeset
for help on using the changeset viewer.