Changeset baf608a for libcfa/src


Ignore:
Timestamp:
Dec 5, 2019, 10:59:19 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
dab98b3e
Parents:
09d4b22
Message:

provide switch to print heap statistics on program termination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/heap.cfa

    r09d4b22 rbaf608a  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec  3 13:58:44 2019
    13 // Update Count     : 642
     12// Last Modified On : Wed Dec  4 21:42:46 2019
     13// Update Count     : 646
    1414//
    1515
     
    3535static bool traceHeap = false;
    3636
    37 inline bool traceHeap() {
    38         return traceHeap;
    39 } // traceHeap
     37inline bool traceHeap() { return traceHeap; }
    4038
    4139bool traceHeapOn() {
     
    5048        return temp;
    5149} // traceHeapOff
     50
     51bool traceHeapTerm() { return false; }
    5252
    5353
     
    694694static void ^?{}( HeapManager & ) {
    695695        #ifdef __STATISTICS__
    696         // if ( traceHeapTerm() ) {
    697         //      printStats();
    698         //      if ( prtfree() ) prtFree( heapManager, true );
    699         // } // if
     696        if ( traceHeapTerm() ) {
     697                printStats();
     698                // if ( prtfree() ) prtFree( heapManager, true );
     699        } // if
    700700        #endif // __STATISTICS__
    701701} // ~HeapManager
Note: See TracChangeset for help on using the changeset viewer.