FGenericPlatformMemory::PageProtect

Changes the protection on a region of committed pages in the virtual address space.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMemory.h

Include

#include "GenericPlatform/GenericPlatformMemory.h"

Source

/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMemory.cpp

Syntax

static bool PageProtect
(
    void *const Ptr,
    const SIZE_T Size,
    const bool bCanRead,
    const bool bCanWrite
)

Remarks

Changes the protection on a region of committed pages in the virtual address space.

Returns

True if the specified pages' protection mode was changed.

Parameters

Parameter

Description

Ptr

Address to the starting page of the region of pages whose access protection attributes are to be changed.

Size

The size of the region whose access protection attributes are to be changed, in bytes.

bCanRead

Can the memory be read.

bCanWrite

Can the memory be written to.