FGenericPlatformMemory::MapNamedSharedMemoryRegion

Maps a named shared memory region into process address space (creates or opens it)

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 FSharedMemoryRegion * MapNamedSharedMemoryRegion
(
    const FString & Name,
    bool bCreate,
    uint32 AccessMode,
    SIZE_T Size
)

Remarks

Maps a named shared memory region into process address space (creates or opens it)

Returns

pointer to FSharedMemoryRegion (or its descendants) if successful, NULL if not.

Parameters

Parameter

Description

Name

unique name of the shared memory region (should not contain [back]slashes to remain cross-platform).

bCreate

whether we're creating it or just opening existing (created by some other process).

AccessMode

mode which we will be accessing it (use values from ESharedMemoryAccess)

Size

size of the buffer (should be >0. Also, the real size is subject to platform limitations and may be increased to match page size)