buffer
buffer copied to clipboard
Adding additional APIs and pointing header directly into file
Purpose of this PR:
- Updates the header to have a magic value so that we can identify the file
- Updates the header structure to point directly into the memory mapped file so that binary read/write cycles are not needed
- Added additional API to allow for overwriting pushes (NOT the default)
- Added Flock to unix builds
- Added additional open method that does not truncate allowing for the buffer to be opened and closed without overwriting header
- Added explicit close method so that systems can open and close this type resource
The PR should be backwards compatible and not break any existing usage, but does add some nice helpers and a little safety around opening existing buffers and making it possible to hand an existing buffer off to an external application which can consume it.