BDE 4.14.0 Production release
|
Provide a set of portable utilities for memory manipulation.
This component, bdls::MemoryUtil
, defines a platform-independent interface for memory manipulation, providing utilities for querying page size, allocating/deallocating page-aligned memory, and utility to change memory protection.
This section illustrates intended use of this component.
First, allocate one page of memory.
Write into the allocated buffer.
Make the memory write protected
Verify that data still could be read.
Once again, try writing into the buffer. This should crash our process.
Restore read/write access and free the allocated memory. Actually, this will never be executed, as the process has already crashed.