diff options
author | Max Kellermann <max@musicpd.org> | 2017-09-21 20:31:03 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-09-21 21:47:49 +0200 |
commit | b46835e15ec0441199094e6aa5e583bcaaed8663 (patch) | |
tree | e04e961a768f44d4358eda7edbf3c9c569291be7 /src/input/ThreadInputStream.cxx | |
parent | 3e5ce3c92cc2001fd99771160a67b7d3d8af2183 (diff) |
util/HugeAllocator: HugeAllocator() returns WritableBuffer<void>
Diffstat (limited to 'src/input/ThreadInputStream.cxx')
-rw-r--r-- | src/input/ThreadInputStream.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input/ThreadInputStream.cxx b/src/input/ThreadInputStream.cxx index b9c9587a4..36f77d557 100644 --- a/src/input/ThreadInputStream.cxx +++ b/src/input/ThreadInputStream.cxx @@ -50,12 +50,13 @@ ThreadInputStream::Start() { assert(buffer == nullptr); - void *p = HugeAllocate(buffer_size); - assert(p != nullptr); + auto allocation = HugeAllocate(buffer_size); + assert(allocation != nullptr); - HugeForkCow(p, buffer_size, false); + HugeForkCow(allocation.data, allocation.size, false); - buffer = new CircularBuffer<uint8_t>((uint8_t *)p, buffer_size); + buffer = new CircularBuffer<uint8_t>((uint8_t *)allocation.data, + allocation.size); thread.Start(); } |