Skip to content

Commit 7c79ff8

Browse files
committed
memory/HugeArray: add method Populate()
1 parent 570f8db commit 7c79ff8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/memory/HugeArray.hxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
#include "HugeAllocator.hxx"
77
#include "util/SpanCast.hxx"
88

9+
#ifdef __linux__
10+
#include "system/PageAllocator.hxx"
11+
#endif
12+
913
#include <utility>
1014

1115
/**
@@ -51,6 +55,10 @@ public:
5155
HugeForkCow(std::as_writable_bytes(buffer), enable);
5256
}
5357

58+
void Populate() noexcept {
59+
HugePopulate(std::as_writable_bytes(buffer));
60+
}
61+
5462
void Discard() noexcept {
5563
HugeDiscard(std::as_writable_bytes(buffer));
5664
}

0 commit comments

Comments
 (0)