schveiguy / iopipe

D language library for modular io
Boost Software License 1.0
77 stars 6 forks source link

Extending buffered iopipe attempts to allocate entire buffer #11

Closed schveiguy closed 6 years ago

schveiguy commented 6 years ago

The BufferManager currently will obey the extension by first attempting to allocate the entire requested memory. However, it should limit growth to prevent pre-allocating too much memory.

This will allow extending buffered iopipes as much as possible without failing, which is a misleading error. For example ensureElems(size_t.max) fails.