MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY DefaultFreeFunc

Function ILAPIENTRY DefaultFreeFunc

DevIL/src-IL/src/il_alloc.cpp:123–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static void ILAPIENTRY DefaultFreeFunc(const void * CONST_RESTRICT ptr)
124{
125 if (ptr)
126 {
127#if defined(VECTORMEM) & defined(MM_MALLOC)
128 _mm_free((void*)ptr);
129#else
130#if defined(VECTORMEM) & !defined(POSIX_MEMALIGN) & !defined(VALLOC) & !defined(MEMALIGN) & !defined(MM_MALLOC)
131 free(((char*)ptr) - ((char*)ptr)[-1]);
132#else
133 free((void*)ptr);
134#endif //OTHERS...
135#endif //MM_MALLOC
136 }
137}
138
139/*** Manipulate Allocation/Deallocation Function ***/
140void ILAPIENTRY ilResetMemory() // Deprecated

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected