base: make Ram_allocator noncopyable

Prevent erratic runtime behavior stemming from accidentally passing a
copy to a `Ram_allocator` by making the interface noncopyable.

Issue #5221
This commit is contained in:
Benjamin Lamowski
2024-12-10 11:30:23 +01:00
committed by Norman Feske
parent dd64164ed6
commit ccdbefd158

View File

@@ -19,6 +19,7 @@
#include <base/quota_guard.h>
#include <base/cache.h>
#include <dataspace/dataspace.h>
#include <util/noncopyable.h>
namespace Genode {
@@ -32,7 +33,7 @@ namespace Genode {
}
struct Genode::Ram_allocator : Interface
struct Genode::Ram_allocator : Interface, Noncopyable
{
enum class Alloc_error { OUT_OF_RAM, OUT_OF_CAPS, DENIED };