Commit 9f827c99 authored by Max Kellermann's avatar Max Kellermann

input/async: use class HugeArray instead of HugeAllocation

parent 7b2b9654
...@@ -37,7 +37,7 @@ AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url, ...@@ -37,7 +37,7 @@ AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url,
deferred_resume(event_loop, BIND_THIS_METHOD(DeferredResume)), deferred_resume(event_loop, BIND_THIS_METHOD(DeferredResume)),
deferred_seek(event_loop, BIND_THIS_METHOD(DeferredSeek)), deferred_seek(event_loop, BIND_THIS_METHOD(DeferredSeek)),
allocation(_buffer_size), allocation(_buffer_size),
buffer((uint8_t *)allocation.get(), _buffer_size), buffer(&allocation.front(), allocation.size()),
resume_at(_resume_at) resume_at(_resume_at)
{ {
allocation.ForkCow(false); allocation.ForkCow(false);
......
...@@ -41,7 +41,7 @@ class AsyncInputStream : public InputStream { ...@@ -41,7 +41,7 @@ class AsyncInputStream : public InputStream {
DeferredCall deferred_resume; DeferredCall deferred_resume;
DeferredCall deferred_seek; DeferredCall deferred_seek;
HugeAllocation allocation; HugeArray<uint8_t> allocation;
CircularBuffer<uint8_t> buffer; CircularBuffer<uint8_t> buffer;
const size_t resume_at; const size_t resume_at;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment