diff --git a/repos/base/include/base/allocator_avl.h b/repos/base/include/base/allocator_avl.h
index 51896f9638..bce9fead39 100644
--- a/repos/base/include/base/allocator_avl.h
+++ b/repos/base/include/base/allocator_avl.h
@@ -19,6 +19,7 @@
#include
#include
#include
+#include
namespace Genode {
@@ -353,11 +354,24 @@ class Genode::Allocator_avl_tpl : public Allocator_avl_base
*/
void metadata(void *addr, BMDT bmd) const
{
- Block *b = static_cast(_find_by_address((addr_t)addr));
+ Block * const b = static_cast(_find_by_address((addr_t)addr));
if (b) *static_cast(b) = bmd;
else throw Assign_metadata_failed();
}
+ /**
+ * Construct meta-data object in place
+ *
+ * \param ARGS arguments passed to the meta-data constuctor
+ */
+ template
+ void construct_metadata(void *addr, ARGS &&... args)
+ {
+ Block * const b = static_cast(_find_by_address((addr_t)addr));
+ if (b) construct_at(static_cast(b), args...);
+ else throw Assign_metadata_failed();
+ }
+
/**
* Return meta data that was attached to block at specified address
*/