ヒープメモリアロケータ
More...
#include <GxAllocatorHeap.h>
◆ ALLOCATE_TYPE
メモリ確保手法
Enumerator |
---|
FAST | 高速探索 (空き領域ハッシュ探索)
|
HEAD | 前方取得
|
TAIL | 後方取得
|
MAX | メモリ確保手法数
|
◆ GxAllocatorHeap() [1/3]
GxAllocatorHeap::GxAllocatorHeap |
( |
GX_CSTR | name | ) |
|
|
protected |
コンストラクタ (クラス内部用)
- Parameters
-
name | [in] アロケータ名 (※開発時のみ有効) |
◆ GxAllocatorHeap() [2/3]
GxAllocatorHeap::GxAllocatorHeap |
( |
GX_CSTR | name, |
|
|
GxMemory::TYPE | type, |
|
|
u32 | size ) |
コンストラクタ
- Parameters
-
name | [in] アロケータ名 (※開発時のみ有効) |
type | [in] メモリ確保タイプ |
size | [in] アロケータ割り当てサイズ |
◆ GxAllocatorHeap() [3/3]
GxAllocatorHeap::GxAllocatorHeap |
( |
GX_CSTR | name, |
|
|
void * | pAddress, |
|
|
u32 | size ) |
コンストラクタ (確保メモリ割り付けタイプ)
- Parameters
-
name | [in] アロケータ名 (※開発時のみ有効) |
pAddress | [in] アロケータ割り当てメモリ |
size | [in] アロケータ割り当てサイズ |
◆ allocateMemory()
メモリ確保
- Parameters
-
type | [in] 確保タイプ (※ALLOCATE_TYPEを指定する) |
size | [in] 確保サイズ |
filename | [in] 呼び出し元ファイル名 (※DEBUG時のみ) |
line | [in] 呼び出し元ソースライン番号 (※DEBUG時のみ) |
alignment | [in] メモリアライメント |
- Returns
- 確保アドレス
Reimplemented from GxAllocator.
◆ allocateMemoryBack()
後方探索メモリ確保
- Parameters
-
size | [in] 確保サイズ |
alignment | [in] メモリアライメント |
- Returns
- 確保メモリアドレス
◆ allocateMemoryFast()
高速探索メモリ確保
- Parameters
-
size | [in] 確保サイズ |
alignment | [in] メモリアライメント |
- Returns
- 確保メモリアドレス
◆ allocateMemoryForward()
前方探索メモリ確保
- Parameters
-
size | [in] 確保サイズ |
alignment | [in] メモリアライメント |
- Returns
- 確保メモリアドレス
◆ create()
GxAllocatorHeap * GxAllocatorHeap::create |
( |
GX_CSTR | name, |
|
|
void * | pAddress, |
|
|
u32 | size ) |
|
static |
メモリ指定生成
- Parameters
-
name | [in] アロケータ名 |
pAddress | [in] ヒープアロケータ生成バッファポインタ |
size | [in] ヒープアロケータサイズ |
- Returns
- ヒープアロケータポインタ
◆ destroy()
メモリ指定破棄
- Parameters
-
pAllocator | [in,out] メモリ指定生成にて取得したフレームアロケータポインタ |
- Note
- セーフ破棄
◆ freeMemory()
void GxAllocatorHeap::freeMemory |
( |
void * | pAddress | ) |
|
|
overridevirtual |
メモリ解放
- Parameters
-
pAddress | [in] 解放アドレス |
filename | [in] 呼び出し元ファイル名 (※DEBUG時のみ) |
line | [in] 呼び出し元ソースライン番号 (※DEBUG時のみ) |
Reimplemented from GxAllocator.
◆ getBlockFromSize()
GX_FORCE_INLINE u32 GxAllocatorHeap::getBlockFromSize |
( |
u32 | size | ) |
|
|
static |
サイズ → ブロック数取得
- Parameters
-
size | [in] サイズ (BLOCK_SIZEアライメント必須) |
- Returns
- 指定したサイズに対応するブロック数
◆ getFreeMax()
u32 GxAllocatorHeap::getFreeMax |
( |
void | | ) |
const |
最大空き容量取得
- Returns
- 最大空き容量
- Note
- ヒープの空き領域の最大値を取得します。
◆ getHashValue()
u32 GxAllocatorHeap::getHashValue |
( |
u32 | value | ) |
const |
|
protected |
ハッシュ値の取得
- Parameters
-
- Returns
- ハッシュ番号
◆ getHeaderPointer()
確保メモリからヘッダーポインタ取得
- Parameters
-
- Returns
- ヘッダーポインタ
◆ getHeaderSize()
GX_FORCE_INLINE u32 GxAllocatorHeap::getHeaderSize |
( |
void | | ) |
|
|
static |
ヘッダーサイズ取得 (※BLOCK_SIZEでのアライメント考慮)
- Returns
- BLOCK_SIZEアライメントでのヘッダーサイズ
◆ getMaxAvailableSize()
最大確保可能サイズ取得
- Parameters
-
- Returns
- 最大確保可能サイズ
- Note
- 連続メモリとして取得可能なヒープの最大確保可能サイズを取得します。
◆ getMemoryPointer()
ヘッダーポインタから確保メモリを取得
- Parameters
-
pHeapInformation | [in] 確保時取得アドレス |
- Returns
- ポインタ
◆ getSizeFromBlock()
GX_FORCE_INLINE u32 GxAllocatorHeap::getSizeFromBlock |
( |
u32 | block | ) |
|
|
static |
ブロック数 → サイズ取得
- Parameters
-
- Returns
- 指定したブロック数に対応するサイズ
◆ initialize()
void GxAllocatorHeap::initialize |
( |
void * | pAddress, |
|
|
u32 | size ) |
|
protected |
初期化
- Parameters
-
pAddress | [in] アロケータ割り当てメモリ |
size | [in] アロケータ割り当てサイズ |
◆ insertHeap()
新規ヒープ情報の挿入
- Parameters
-
pBaseHeap | [in,out] 挿入先ヒープ情報 |
pInsertHeap | [in,out] 挿入ヒープ情報 |
◆ isValid() [1/2]
指定管理領域のチェック
- Parameters
-
pHeapInformation | [in] チェック対象ヒープ情報 |
- Returns
- 成功ならtrue
◆ isValid() [2/2]
b32 GxAllocatorHeap::isValid |
( |
void | | ) |
|
全体管理領域のチェック
- Returns
- 成功ならtrue
◆ linkFreeHeapList()
◆ reallocMemory()
void * GxAllocatorHeap::reallocMemory |
( |
void * | pAddress, |
|
|
u32 | size ) |
|
overridevirtual |
メモリ割り当てサイズ変更
- Parameters
-
pAddress | [in] 変更元アドレス |
size | [in] 変更後サイズ |
filename | [in] 呼び出し元ファイル名 (※DEBUG時のみ) |
line | [in] 呼び出し元ソースライン番号 (※DEBUG時のみ) |
- Returns
- 変更後メモリアドレス (nullptrの場合:再確保失敗)
Reimplemented from GxAllocator.
The documentation for this class was generated from the following files:
- C:/Users/t-arai/Documents/workspace/orochi_package_windows/middleware/GxCore/src/GxAllocatorHeap.h
- C:/Users/t-arai/Documents/workspace/orochi_package_windows/middleware/GxCore/src/GxAllocatorHeap.cpp