00001 /* 00002 FALCON - The Falcon Programming Language. 00003 FILE: heap.h 00004 00005 00006 ------------------------------------------------------------------- 00007 Author: Giancarlo Niccolai 00008 Begin: Sat, 13 Dec 2008 13:45:59 +0100 00009 00010 ------------------------------------------------------------------- 00011 (C) Copyright 2008: the FALCON developers (see list in AUTHORS file) 00012 00013 See LICENSE file for licensing details. 00014 */ 00015 00016 #ifndef FALCON_HEAP_H 00017 #define FALCON_HEAP_H 00018 00019 namespace Falcon { 00020 00021 namespace Sys { 00022 int sys_pageSize(); 00023 void* sys_allocPage(); 00024 void sys_freePage( void *page ); 00025 } 00026 00039 class HeapMem 00040 { 00041 public: 00042 00043 HeapMem(); 00044 ~HeapMem(); 00045 00046 int pageSize() { return Sys::sys_pageSize(); } 00047 void *allocPage() { return Sys::sys_allocPage(); } 00048 void freePage( void *page ) { Sys::sys_freePage( page ); } 00049 }; 00050 00051 extern HeapMem Heap; 00052 00053 } 00054 00055 #endif 00056 00057 /* end of heap.h */