input/async: use class HugeArray instead of HugeAllocation
This commit is contained in:
parent
7b2b965415
commit
9f827c99cb
@ -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 {
|
|||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user