1 /* ----------------------------------------------------------------------------- 2 * 3 * (c) The GHC Team, 1998-1999 4 * 5 * Block Allocator Interface 6 * 7 * ---------------------------------------------------------------------------*/ 8 9 #pragma once 10 11 #include "BeginPrivate.h" 12 13 bdescr *allocLargeChunk (W_ min, W_ max); 14 bdescr *allocLargeChunkOnNode (uint32_t node, W_ min, W_ max); 15 16 /* Debugging -------------------------------------------------------------- */ 17 18 extern W_ countBlocks (bdescr *bd); 19 extern W_ countAllocdBlocks (bdescr *bd); 20 extern void returnMemoryToOS(uint32_t n); 21 22 #if defined(DEBUG) 23 void checkFreeListSanity(void); 24 W_ countFreeList(void); 25 void markBlocks (bdescr *bd); 26 void reportUnmarkedBlocks (void); 27 #endif 28 29 extern W_ n_alloc_blocks; // currently allocated blocks 30 extern W_ hw_alloc_blocks; // high-water allocated blocks 31 32 #include "EndPrivate.h" 33