libc: remove global env from mmap registry

Issue #2280.
This commit is contained in:
Josef Söntgen 2017-02-22 13:29:49 +01:00 committed by Christian Helmuth
parent a79f7d234b
commit 5ec7a0e2f8
1 changed files with 5 additions and 5 deletions

View File

@ -11,9 +11,7 @@
#include <base/lock.h>
#include <base/env.h>
#include <base/log.h>
/* Genode libc includes */
#include <errno.h>
#include <libc/allocator.h>
/* libc-internal includes */
#include <libc-plugin/plugin.h>
@ -47,6 +45,8 @@ class Libc::Mmap_registry
private:
Libc::Allocator _md_alloc;
Genode::List<Mmap_registry::Entry> _list;
Genode::Lock mutable _lock;
@ -86,7 +86,7 @@ class Libc::Mmap_registry
return;
}
_list.insert(new (Genode::env()->heap()) Entry(start, plugin));
_list.insert(new (&_md_alloc) Entry(start, plugin));
}
Plugin *lookup_plugin_by_addr(void *start) const
@ -117,7 +117,7 @@ class Libc::Mmap_registry
}
_list.remove(e);
destroy(Genode::env()->heap(), e);
destroy(&_md_alloc, e);
}
};