Changes in libcfa/src/heap.cfa [c58ead7:a47fe52]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
rc58ead7 ra47fe52 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 11 11:21:10 202313 // Update Count : 161 512 // Last Modified On : Wed Aug 2 18:48:30 2023 13 // Update Count : 1614 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 } // for702 703 unlock( mgrLock );704 } // clearStats705 693 #endif // __STATISTICS__ 706 694 … … 1568 1556 1569 1557 1570 // Zero the heap master and all active thread heaps.1571 void malloc_stats_clear() {1572 #ifdef __STATISTICS__1573 clearStats();1574 #else1575 #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 } // if1579 #endif // __STATISTICS__1580 } // malloc_stats_clear1581 1582 1583 1558 // Changes the file descriptor where malloc_stats() writes statistics. 1584 1559 int malloc_stats_fd( int fd __attribute__(( unused )) ) libcfa_public {
Note: See TracChangeset
for help on using the changeset viewer.