00001 /* 00002 FALCON - The Falcon Programming Language. 00003 FILE: flc_itempage.h 00004 00005 Definition of the page that holds items. 00006 ------------------------------------------------------------------- 00007 Author: Giancarlo Niccolai 00008 Begin: lun ott 4 2004 00009 00010 ------------------------------------------------------------------- 00011 (C) Copyright 2004: the FALCON developers (see list in AUTHORS file) 00012 00013 See LICENSE file for licensing details. 00014 */ 00015 00020 #ifndef flc_flc_itempage_H 00021 #define flc_flc_itempage_H 00022 00023 #include <falcon/setup.h> 00024 #include <falcon/basealloc.h> 00025 #include <falcon/item.h> 00026 00027 #define PAGE_SIZE 4096 00028 #define FREE_PAGE_SPACE (PAGE_SIZE - sizeof( ItemPage *) - sizeof( ItemPage *) ) 00029 #define PAGE_ITEM_COUNT (FREE_PAGE_SPACE/sizeof( Item ) ) 00030 00031 namespace Falcon { 00032 00033 class MemPool; 00034 00038 class ItemPage: public BaseAlloc 00039 { 00040 public: 00041 ItemPage *m_prev; 00042 ItemPage *m_next; 00043 Item items[ PAGE_ITEM_COUNT ]; 00044 // padding here 00045 }; 00046 00047 } 00048 00049 #endif 00050 00051 /* end of flc_itempage.h */