From 2eca4ec98b67ed0217d84395af715396be740f43 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 16 Oct 2014 14:59:26 +0200 Subject: [PATCH] base: document specifics of Slab::alloc() Also removed unimplemented overload of alloc() with no parameters. --- repos/base/include/base/slab.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/repos/base/include/base/slab.h b/repos/base/include/base/slab.h index 25aad44156..56e2b6bd2c 100644 --- a/repos/base/include/base/slab.h +++ b/repos/base/include/base/slab.h @@ -216,11 +216,6 @@ namespace Genode { */ void insert_sb(Slab_block *sb, Slab_block *at = 0); - /** - * Allocate slab entry - */ - void *alloc(); - /** * Free slab entry */ @@ -242,10 +237,17 @@ namespace Genode { void backing_store(Allocator *bs) { _backing_store = bs; } Allocator *backing_store() { return _backing_store; } + /************************* + ** Allocator interface ** + *************************/ + /** - * Allocator interface + * Allocate slab entry + * + * The 'size' parameter is ignored as only slab entries with + * preconfigured slab-entry size are allocated. */ - bool alloc(size_t, void **); + bool alloc(size_t size, void **addr); void free(void *addr, size_t) { free(addr); } size_t consumed(); size_t overhead(size_t) { return _block_size/_num_elem; }