Ignore:
Timestamp:
Aug 14, 2018, 4:10:58 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 moved

Legend:

Unmodified
Added
Removed
  • libcfa/src/heap.cfa

    rc3a8ecd r7cd8827  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // heap.c -- 
    8 // 
     6//
     7// heap.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Dec 19 21:58:35 2017
     
    1212// Last Modified On : Sat Aug 11 08:22:16 2018
    1313// Update Count     : 495
    14 // 
     14//
    1515
    1616#include <unistd.h>                                                                             // sbrk, sysconf
     
    2222} // extern "C"
    2323
    24 #include "bits/align.h"                                                                 // libPow2
    25 #include "bits/defs.h"                                                                  // likely, unlikely
    26 #include "bits/locks.h"                                                                 // __spinlock_t
    27 #include "startup.h"                                                                    // STARTUP_PRIORITY_MEMORY
    28 #include "stdlib"                                                                               // bsearchl
     24#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
    2929#include "malloc.h"
    3030
     
    282282static void ?{}( HeapManager & manager ) with ( manager ) {
    283283    pageSize = sysconf( _SC_PAGESIZE );
    284    
     284
    285285    for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists
    286286                freeLists[i].blockSize = bucketSizes[i];
     
    758758                bool mapped __attribute__(( unused )) = headers( "calloc", area, header, freeElem, asize, alignment );
    759759                #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.
    761761                if ( ! mapped )
    762762                #endif // __CFA_DEBUG__
     
    781781                bool mapped __attribute__(( unused )) = headers( "cmemalign", area, header, freeElem, asize, alignment );
    782782                #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.
    784784                if ( ! mapped )
    785785                #endif // __CFA_DEBUG__
     
    826826                        bool mapped __attribute__(( unused )) = headers( "realloc", area, header, freeElem, asize, alignment );
    827827                        #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.
    829829                        if ( ! mapped )
    830830                        #endif // __CFA_DEBUG__
Note: See TracChangeset for help on using the changeset viewer.