summaryrefslogtreecommitdiff
path: root/src/input/ThreadInputStream.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-09-21 20:31:03 +0200
committerMax Kellermann <max@musicpd.org>2017-09-21 21:47:49 +0200
commitb46835e15ec0441199094e6aa5e583bcaaed8663 (patch)
treee04e961a768f44d4358eda7edbf3c9c569291be7 /src/input/ThreadInputStream.cxx
parent3e5ce3c92cc2001fd99771160a67b7d3d8af2183 (diff)
util/HugeAllocator: HugeAllocator() returns WritableBuffer<void>
Diffstat (limited to 'src/input/ThreadInputStream.cxx')
-rw-r--r--src/input/ThreadInputStream.cxx9
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();
}