Go to the source code of this file.
| typedef void( dtFreeFunc) (void *ptr) |
Provides hint values to the memory allocator on how long the memory is expected to be used.
| Enumerator |
|---|
| DT_ALLOC_PERM |
Memory persist after a function call.
|
| DT_ALLOC_TEMP |
Memory used temporarily within a function.
|
Definition at line 24 of file DetourAlloc.h.
Allocates a memory block.
- Parameters
-
| [in] | size | The size, in bytes of memory, to allocate. |
| [in] | hint | A hint to the allocator on how long the memory is expected to be in use. |
- Returns
- A pointer to the beginning of the allocated memory block, or null if the allocation failed.
- See also
- dtFree
Sets the base custom allocation functions to be used by Detour.
- Parameters
-
| [in] | allocFunc | The memory allocation function to be used by dtAlloc |
| [in] | freeFunc | The memory de-allocation function to be used by dtFree |
| void dtFree |
( |
void * |
ptr | ) |
|
Deallocates a memory block.
- Parameters
-
| [in] | ptr | A pointer to a memory block previously allocated using dtAlloc. |
- See also
- dtAlloc