From 689c08e4119b1eb0b07a981ddcb40702bfebb92b Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 18 Sep 2012 15:51:13 +0200 Subject: [PATCH] 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. --- base/include/base/allocator_avl.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/include/base/allocator_avl.h b/base/include/base/allocator_avl.h index de7239176a..89b705cfb8 100644 --- a/base/include/base/allocator_avl.h +++ b/base/include/base/allocator_avl.h @@ -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 _metadata; /* meta-data allocator */ - char _initial_md_block[1024]; /* first (static) meta-data block */ + Tslab _metadata; /* meta-data allocator */ + char _initial_md_block[SLAB_BLOCK_SIZE]; /* first (static) meta-data block */ public: