Changeset 7cd8827 for libcfa/src/heap.cfa
- Timestamp:
- Aug 14, 2018, 4:10:58 PM (7 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:
- 636e1b9
- Parents:
- c3a8ecd (diff), 5a5d31a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
libcfa/src/heap.cfa (moved) (moved from src/libcfa/heap.c ) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
rc3a8ecd r7cd8827 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 : Sat Aug 11 08:22:16 2018 13 13 // Update Count : 495 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_MEMORY28 #include "stdlib " // bsearchl24 #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 #include "stdlib.hfa" // bsearchl 29 29 #include "malloc.h" 30 30 … … 282 282 static void ?{}( HeapManager & manager ) with ( manager ) { 283 283 pageSize = sysconf( _SC_PAGESIZE ); 284 284 285 285 for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists 286 286 freeLists[i].blockSize = bucketSizes[i]; … … 758 758 bool mapped __attribute__(( unused )) = headers( "calloc", area, header, freeElem, asize, alignment ); 759 759 #ifndef __CFA_DEBUG__ 760 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 760 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 761 761 if ( ! mapped ) 762 762 #endif // __CFA_DEBUG__ … … 781 781 bool mapped __attribute__(( unused )) = headers( "cmemalign", area, header, freeElem, asize, alignment ); 782 782 #ifndef __CFA_DEBUG__ 783 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 783 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 784 784 if ( ! mapped ) 785 785 #endif // __CFA_DEBUG__ … … 826 826 bool mapped __attribute__(( unused )) = headers( "realloc", area, header, freeElem, asize, alignment ); 827 827 #ifndef __CFA_DEBUG__ 828 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 828 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 829 829 if ( ! mapped ) 830 830 #endif // __CFA_DEBUG__
Note:
See TracChangeset
for help on using the changeset viewer.