util/HugeAllocator: HugeAllocator() returns WritableBuffer<void>

This commit is contained in:
Max Kellermann
2017-09-21 20:31:03 +02:00
parent 3e5ce3c92c
commit b46835e15e
4 changed files with 32 additions and 30 deletions

View File

@@ -72,7 +72,7 @@ class SliceBuffer {
public:
SliceBuffer(unsigned _count)
:n_max(_count),
data((Slice *)HugeAllocate(CalcAllocationSize())) {
data((Slice *)HugeAllocate(CalcAllocationSize()).data) {
assert(n_max > 0);
HugeForkCow(data, CalcAllocationSize(), false);