Allocate and lock memory pages. If len is not a multiple of the system page size, it is rounded up. Returns nullptr in case of allocation failure.
Declared in <support/lockedpool.h>
virtual
void*
AllocateLocked(
size_t len,
bool* lockingSuccess) = 0;
If locking the memory pages could not be accomplished it will still return the memory, however the lockingSuccess flag will be false. lockingSuccess is undefined if the allocation fails.
Pointer to the allocated memory, or nullptr on failure.
| Name | Description |
|---|---|
| len | Number of bytes to allocate, rounded up to the page size. |
| lockingSuccess | Set to true if the pages were locked, false otherwise. |