Blender V5.0
BLI_mempool Struct Reference

Public Attributes

BLI_mempool_chunkchunks
BLI_mempool_chunkchunk_tail
uint esize
uint csize
uint pchunk
uint flag
BLI_freenodefree
uint maxchunks
uint totused

Detailed Description

The mempool, stores and tracks memory chunks and elements within those chunks free.

Definition at line 100 of file BLI_mempool.cc.

Member Data Documentation

◆ chunk_tail

BLI_mempool_chunk* BLI_mempool::chunk_tail

Keep a pointer to the last, so we can append new chunks there this is needed for iteration so we can loop over chunks in the order added.

Definition at line 109 of file BLI_mempool.cc.

Referenced by BLI_mempool_alloc(), BLI_mempool_clear_ex(), BLI_mempool_create(), BLI_mempool_free(), and mempool_chunk_add().

◆ chunks

BLI_mempool_chunk* BLI_mempool::chunks

Single linked list of allocated chunks.

Definition at line 106 of file BLI_mempool.cc.

Referenced by BLI_mempool_clear_ex(), BLI_mempool_create(), BLI_mempool_destroy(), BLI_mempool_free(), BLI_mempool_iternew(), and mempool_chunk_add().

◆ csize

uint BLI_mempool::csize

Chunk size in bytes.

Definition at line 114 of file BLI_mempool.cc.

Referenced by BLI_mempool_create(), BLI_mempool_free(), mempool_chunk_alloc(), and mempool_chunk_free().

◆ esize

◆ flag

◆ free

BLI_freenode* BLI_mempool::free

Free element list. Interleaved into chunk data.

Definition at line 120 of file BLI_mempool.cc.

Referenced by BLI_mempool_alloc(), BLI_mempool_clear_ex(), BLI_mempool_create(), BLI_mempool_free(), and mempool_chunk_add().

◆ maxchunks

uint BLI_mempool::maxchunks

Use to know how many chunks to keep for BLI_mempool_clear.

Definition at line 122 of file BLI_mempool.cc.

Referenced by BLI_mempool_clear_ex(), and BLI_mempool_create().

◆ pchunk

uint BLI_mempool::pchunk

◆ totused

uint BLI_mempool::totused

Number of elements currently in use.

Definition at line 124 of file BLI_mempool.cc.

Referenced by BLI_mempool_alloc(), BLI_mempool_as_arrayN(), BLI_mempool_clear_ex(), BLI_mempool_create(), BLI_mempool_free(), and BLI_mempool_len().


The documentation for this struct was generated from the following file: