mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-29 18:18:54 +00:00
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:
parent
361a67d749
commit
689c08e411
@ -257,13 +257,15 @@ namespace Genode {
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
enum { SLAB_BLOCK_SIZE = 256 * sizeof(addr_t) };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pump up the Block class with custom meta-data type
|
* Pump up the Block class with custom meta-data type
|
||||||
*/
|
*/
|
||||||
class Block : public Allocator_avl_base::Block, public BMDT { };
|
class Block : public Allocator_avl_base::Block, public BMDT { };
|
||||||
|
|
||||||
Tslab<Block,1024> _metadata; /* meta-data allocator */
|
Tslab<Block,SLAB_BLOCK_SIZE> _metadata; /* meta-data allocator */
|
||||||
char _initial_md_block[1024]; /* first (static) meta-data block */
|
char _initial_md_block[SLAB_BLOCK_SIZE]; /* first (static) meta-data block */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user