Changeset 7117ac3


Ignore:
Timestamp:
Sep 8, 2018, 8:58:17 AM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
e15ba975
Parents:
bec4d24
Message:

temporary fix for malloc call before memory_startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/heap.cfa

    rbec4d24 r7117ac3  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 23 06:11:44 2018
    13 // Update Count     : 511
     12// Last Modified On : Thu Sep  6 09:01:30 2018
     13// Update Count     : 513
    1414//
    1515
     
    329329        #endif // __CFA_DEBUG__
    330330
    331         assert( heapManager.heapBegin == 0 );                           // always perform check, done once
    332         heapManager{};
     331        //assert( heapManager.heapBegin != 0 );
     332        //heapManager{};
     333        if ( heapManager.heapBegin == 0 ) heapManager{};
    333334} // memory_startup
    334335
     
    700701
    701702static inline void * mallocNoStats( size_t size ) {             // necessary for malloc statistics
    702         assert( heapManager.heapBegin != 0 );
     703        //assert( heapManager.heapBegin != 0 );
     704        if ( unlikely( heapManager.heapBegin == 0 ) ) heapManager{}; // called before memory_startup ?
    703705        void * area = doMalloc( size );
    704706        if ( unlikely( area == 0 ) ) errno = ENOMEM;            // POSIX
Note: See TracChangeset for help on using the changeset viewer.