mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
ealanos: Let allocator test allocate memory from each NUMA region.
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#include <base/tslab.h>
|
#include <base/tslab.h>
|
||||||
|
|
||||||
#include <ealanos/memory/hamstraaja.h>
|
#include <ealanos/memory/hamstraaja.h>
|
||||||
|
#include <tukija/syscall-generic.h>
|
||||||
|
|
||||||
namespace Ealan::Memory {
|
namespace Ealan::Memory {
|
||||||
class CoreheapTest;
|
class CoreheapTest;
|
||||||
@@ -147,7 +148,14 @@ class Ealan::Memory::CoreheapTest
|
|||||||
for (unsigned i = 0; i < 2*MAX / MIN; i++) {
|
for (unsigned i = 0; i < 2*MAX / MIN; i++) {
|
||||||
_hamstraaja->free(ptrs[i], 0);
|
_hamstraaja->free(ptrs[i], 0);
|
||||||
}
|
}
|
||||||
end = Genode::Trace::timestamp();
|
end = Genode::Trace::timestamp();
|
||||||
|
|
||||||
|
Genode::log("Trying to get memory from each NUMA region");
|
||||||
|
Tukija::Tip::tip()->for_each([&](Tukija::Tip::Domain &dom) {
|
||||||
|
void *ptr = _hamstraaja->aligned_alloc(64, 0, dom.id);
|
||||||
|
Genode::log("[node ", dom.id, "] ", ptr);
|
||||||
|
});
|
||||||
|
|
||||||
Genode::log("Took ", (end - start), " cycles to free ", 2*MAX / MIN, " blocks from Hamstraaja");
|
Genode::log("Took ", (end - start), " cycles to free ", 2*MAX / MIN, " blocks from Hamstraaja");
|
||||||
Genode::log("Testing Hamstraaja as drop-in replacement for Genode::Heap");
|
Genode::log("Testing Hamstraaja as drop-in replacement for Genode::Heap");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user