[#LockedPageAllocator-AllocateLocked] = xref:LockedPageAllocator.adoc[LockedPageAllocator]::AllocateLocked :relfileprefix: ../ :mrdocs: 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. == Synopsis Declared in `<support/lockedpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual void* AllocateLocked( size_t len, bool* lockingSuccess) = 0; ---- == Description 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. == Return Value Pointer to the allocated memory, or nullptr on failure. == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#