FMemStackBase

Simple linear-allocation memory stack.

Windows
MacOS
Linux

Inheritance Hierarchy

FMemStackBase

FMemStack

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/MemStack.h

Include

#include "Misc/MemStack.h"

Syntax

class FMemStackBase

Remarks

Simple linear-allocation memory stack. Items are allocated via PushBytes() or the specialized operator new()s. Items are freed en masse by using FMemMark to Pop() them.

Constructors

Name Description

Public function

FMemStackBase

(
    int32 InMinMarksToAlloc
)

Destructors

Name Description

Public function

~FMemStackBase()

Functions

Name Description

Public function

void *

 

Alloc

(
    int32 AllocSize,
    int32 Alignment
)

Public function Const

bool

 

ContainsPointer

(
    const void* Pointer
)

Returns true if the pointer was allocated using this allocator.

Public function

void

 

Flush()

Public function Const

int32

 

GetByteCount()

Public function

int32

 

GetNumMarks()

Public function Const

bool

 

IsEmpty()

Return true if this stack is empty.

Public function

uint8 *

 

PushBytes

(
    int32 AllocSize,
    int32 Alignment
)

Classes

Name

Description

Public struct

FTaggedMemory

Types.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback