Appendix

CMake Flags

The following CMake flags can be seen when building an application using the CMake-GUI. Be aware that some defines require other defines to be set first in order to be displayed in the CMake-GUI.

CMake Flags

Candera flags

 

CMake Flags

Courier flags

 

CMake Flags

FeatStd flags

 

CMake Flags

Monitor flags

 

CMake Flags

CGIApp flags

 

CMake Flags

Control Behaviors Flags

CMake Flags

Third Party Software Flags

 

CMake Flags

FreeType flags

 

CMake Flags

Other flags

Candera Memory Pools Analysis

Candera Memory Pools Analysis

Memory Pools Configuration

Introduction

If free memory in backing heap is exhausted, "Out of Memory" occurs. The possible reasons are as the below.


Please see the following pages:



 

Candera Memory Pools Analysis

Memory Pool Configuration

Fragmentation

drawing-4-1678251879.png


Heap Areas

drawing-4-1678251999.png


Default Memory Pool Example

Let’s have a look on an example:

drawing-4-1678255213.png
drawing-4-1678255251.png

 

Memory Pool Example Outcome

Interpret MemoryPoolAnalysis.xlsx

When a permanent block with size 12800 Byte is used for 160 Byte allocation…

12800
 C:\CGI-Studio_3.10\cgi_studio_candera\src\Candera\Engine2D\Core\RenderNode.cpp(66)

      1. Determine the bin according the requested buffer size 
      2. Check the free list of the identified bin
      3. If no block is found in the free list, try to allocate a buffer from the backing heap. 
      4. If the allocation from the backing heap fails, try to allocate from the next larger bins (overflow).

Proper Memory Pool Analysis

Proper Memory Pool Configuration


Wasted Space vs. Unused blocks

drawing-4-1678252820.png


Process of Configuration

Reduce Number of Bins

Reduce the number of bins generously
Too many bins -> many free blocks not used
“Wasted Space” < Not used blocks!

drawing-4-1678253010.png

Choose “Small Bin Limit”

drawing-4-1678254380.png

Result

drawing-4-1678254563.png


Advanced Topics







Candera Memory Pools Analysis

“Unexpected” Allocations

VRAM Memory Pool

Asset Cache

16384
C:\CGI-Studio_3.10\cgi_studio_candera\src\CanderaAssetLoader\AssetLoaderBase\AssetCache.cpp(38)