Changeset b38b22f


Ignore:
Timestamp:
May 22, 2021, 9:23:41 AM (17 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
9b0bb79
Parents:
f1bce515
Message:

add missing heap statistic counters for free calls and free storage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/heap.cfa

    rf1bce515 rb38b22f  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May  5 13:11:28 2021
    13 // Update Count     : 1035
     12// Last Modified On : Sat May 22 08:46:39 2021
     13// Update Count     : 1036
    1414//
    1515
     
    640640
    641641                #ifdef __STATISTICS__
    642                 free_storage += size;
    643                 #endif // __STATISTICS__
     642                __atomic_add_fetch( &free_calls, 1, __ATOMIC_SEQ_CST );
     643                __atomic_add_fetch( &free_storage, size, __ATOMIC_SEQ_CST );
     644                #endif // __STATISTICS__
     645
    644646                #if BUCKETLOCK == SPINLOCK
    645647                lock( freeElem->lock __cfaabi_dbg_ctx2 );               // acquire spin lock
Note: See TracChangeset for help on using the changeset viewer.