Make first block of allocator_avl 64bit fit

The first metadata-block, which is inherent part of the allocator object
itself has a fixed size which isn't suitable enough for some 64bit platforms
(e.g. core's RAM-allocator on a 64bit platform with lots of different regions).
This commit let the block size be address-width aware.
This commit is contained in:
Stefan Kalkowski 2012-09-18 15:51:13 +02:00 committed by Norman Feske
parent 361a67d749
commit 689c08e411

View File

@ -257,13 +257,15 @@ namespace Genode {
{
private:
enum { SLAB_BLOCK_SIZE = 256 * sizeof(addr_t) };
/*
* Pump up the Block class with custom meta-data type
*/
class Block : public Allocator_avl_base::Block, public BMDT { };
Tslab<Block,1024> _metadata; /* meta-data allocator */
char _initial_md_block[1024]; /* first (static) meta-data block */
Tslab<Block,SLAB_BLOCK_SIZE> _metadata; /* meta-data allocator */
char _initial_md_block[SLAB_BLOCK_SIZE]; /* first (static) meta-data block */
public: