util/HugeAllocator: move MADV_DONTFORK setting to HugeForkCow()

Enforcing MADV_DONTFORK is a surprising limitation for this library
which aims to be generic.
This commit is contained in:
Max Kellermann
2017-09-19 19:52:02 +02:00
parent f6691579de
commit 8753e558f2
5 changed files with 38 additions and 7 deletions

View File

@@ -74,6 +74,8 @@ public:
:n_max(_count),
data((Slice *)HugeAllocate(CalcAllocationSize())) {
assert(n_max > 0);
HugeForkCow(data, CalcAllocationSize(), false);
}
~SliceBuffer() {