Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
In situations where memory-mapping is available, copying bytes into a newly-allocated memory buffer may be unnecessary.
I propose to generally simplify the interface to random-access capable data sources to instead return a Buffer object (that I'll define) whose subclasses can be responsible for RAII memory-allocation/deallocation if it is necessary. This way, users of RandomAccessSource need not necessarily be responsible for memory allocation and object lifetime management.
Not an urgent matter but will get a patch together sometime in the next several weeks (most likely at the same time as adding a memory-mapped file input source).
As an aside, it would be useful to have this same kind of abstraction available in the context of compressed data pages (note the decompression buffer member variable in ColumnReader)