input/async: use class HugeArray instead of HugeAllocation

This commit is contained in:
Max Kellermann 2017-09-21 21:50:45 +02:00
parent 7b2b965415
commit 9f827c99cb
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url,
deferred_resume(event_loop, BIND_THIS_METHOD(DeferredResume)),
deferred_seek(event_loop, BIND_THIS_METHOD(DeferredSeek)),
allocation(_buffer_size),
buffer((uint8_t *)allocation.get(), _buffer_size),
buffer(&allocation.front(), allocation.size()),
resume_at(_resume_at)
{
allocation.ForkCow(false);

View File

@ -41,7 +41,7 @@ class AsyncInputStream : public InputStream {
DeferredCall deferred_resume;
DeferredCall deferred_seek;
HugeAllocation allocation;
HugeArray<uint8_t> allocation;
CircularBuffer<uint8_t> buffer;
const size_t resume_at;