mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
squash "base: make Ram_allocator noncopyable" (new commit message)
Prevent erratic runtime behavior stemming from accidentally passing a copy to a `Ram_allocator` by making the interface noncopyable. In consequence, we had to provide an explicit copy constructor for `Session_env` in server/nic_router, which will be reconsidered in issue #5405. Issue #5221
This commit is contained in:
committed by
Christian Helmuth
parent
294ba9d30a
commit
7fcfa4ede5
@@ -104,6 +104,18 @@ class Genode::Session_env : public Ram_allocator,
|
||||
_cap_guard { cap_quota }
|
||||
{ }
|
||||
|
||||
/*
|
||||
* The Ram_allocator interface is Noncopyable, but this
|
||||
* implementation is safe to copy.
|
||||
*/
|
||||
Session_env(Session_env const &session)
|
||||
:
|
||||
_env { session._env },
|
||||
_shared_quota { session._shared_quota },
|
||||
_ram_guard { session._ram_guard },
|
||||
_cap_guard { session._cap_guard }
|
||||
{ }
|
||||
|
||||
Entrypoint &ep() { return _env.ep(); }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user