Changeset 73abe95 for libcfa/src/heap.cfa
- Timestamp:
- Aug 6, 2018, 2:50:03 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 58b6d1b
- Parents:
- ff593a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
rff593a3 r73abe95 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // heap.c -- 8 // 6 // 7 // heap.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Dec 19 21:58:35 2017 … … 12 12 // Last Modified On : Tue Jul 31 18:08:50 2018 13 13 // Update Count : 470 14 // 14 // 15 15 16 16 #include <unistd.h> // sbrk, sysconf … … 22 22 } // extern "C" 23 23 24 #include "bits/align.h " // libPow225 #include "bits/defs.h " // likely, unlikely26 #include "bits/locks.h " // __spinlock_t27 #include "startup.h " // STARTUP_PRIORITY_MEMORY24 #include "bits/align.hfa" // libPow2 25 #include "bits/defs.hfa" // likely, unlikely 26 #include "bits/locks.hfa" // __spinlock_t 27 #include "startup.hfa" // STARTUP_PRIORITY_MEMORY 28 28 #include "stdlib" // bsearchl 29 29 #include "malloc.h" … … 283 283 static void ?{}( HeapManager & manager ) with ( manager ) { 284 284 pageSize = sysconf( _SC_PAGESIZE ); 285 285 286 286 for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists 287 287 freeLists[i].blockSize = bucketSizes[i]; … … 760 760 _Bool mapped __attribute__(( unused )) = headers( "calloc", area, header, freeElem, asize, alignment ); 761 761 #ifndef __CFA_DEBUG__ 762 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 762 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 763 763 if ( ! mapped ) 764 764 #endif // __CFA_DEBUG__ … … 783 783 _Bool mapped __attribute__(( unused )) = headers( "cmemalign", area, header, freeElem, asize, alignment ); 784 784 #ifndef __CFA_DEBUG__ 785 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 785 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 786 786 if ( ! mapped ) 787 787 #endif // __CFA_DEBUG__ … … 828 828 _Bool mapped __attribute__(( unused )) = headers( "realloc", area, header, freeElem, asize, alignment ); 829 829 #ifndef __CFA_DEBUG__ 830 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 830 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 831 831 if ( ! mapped ) 832 832 #endif // __CFA_DEBUG__
Note: See TracChangeset
for help on using the changeset viewer.