Lines Matching refs:pAllocator
28 static void* _DefAllocDebug(IFX_Allocator* pAllocator, size_t size, FX_LPCSTR filename, int line)
30 return ((FX_DefAllocator*)pAllocator)->m_pFoxitMgr->AllocDebug(size, 0, filename, line);
32 static void* _DefAlloc(IFX_Allocator* pAllocator, size_t size)
34 return ((FX_DefAllocator*)pAllocator)->m_pFoxitMgr->Alloc(size, 0);
36 static void* _DefReallocDebug(IFX_Allocator* pAllocator, void* p, size_t size, FX_LPCSTR filename, int line)
38 return ((FX_DefAllocator*)pAllocator)->m_pFoxitMgr->ReallocDebug(p, size, 0, filename, line);
40 static void* _DefRealloc(IFX_Allocator* pAllocator, void* p, size_t size)
42 return ((FX_DefAllocator*)pAllocator)->m_pFoxitMgr->Realloc(p, size, 0);
44 static void _DefFree(IFX_Allocator* pAllocator, void* p)
46 ((FX_DefAllocator*)pAllocator)->m_pFoxitMgr->Free(p, 0);
194 void* CFX_AllocObject::operator new(size_t size, IFX_Allocator* pAllocator, FX_LPCSTR filename, int line)
196 void* p = pAllocator ? pAllocator->m_AllocDebug(pAllocator, size, filename, line) :
198 ((CFX_AllocObject*)p)->m_pAllocator = pAllocator;
201 void CFX_AllocObject::operator delete (void* p, IFX_Allocator* pAllocator, FX_LPCSTR filename, int line)
203 if (pAllocator) {
204 pAllocator->m_Free(pAllocator, p);
209 void* CFX_AllocObject::operator new(size_t size, IFX_Allocator* pAllocator)
211 void* p = pAllocator ? pAllocator->m_Alloc(pAllocator, size) : g_pDefFoxitMgr->Alloc(size, 0);
212 ((CFX_AllocObject*)p)->m_pAllocator = pAllocator;
223 void CFX_AllocObject::operator delete(void* p, IFX_Allocator* pAllocator)
225 if (pAllocator) {
226 pAllocator->m_Free(pAllocator, p);
232 static void* _GOPAllocDebug(IFX_Allocator* pAllocator, size_t size, FX_LPCSTR file, int line)
234 return ((CFX_GrowOnlyPool*)pAllocator)->Alloc(size);
236 static void* _GOPAlloc(IFX_Allocator* pAllocator, size_t size)
238 return ((CFX_GrowOnlyPool*)pAllocator)->Alloc(size);
240 static void* _GOPReallocDebug(IFX_Allocator* pAllocator, void* p, size_t new_size, FX_LPCSTR file, int line)
242 return ((CFX_GrowOnlyPool*)pAllocator)->Realloc(p, new_size);
244 static void* _GOPRealloc(IFX_Allocator* pAllocator, void* p, size_t new_size)
246 return ((CFX_GrowOnlyPool*)pAllocator)->Realloc(p, new_size);
248 static void _GOPFree(IFX_Allocator* pAllocator, void* p)
252 CFX_GrowOnlyPool::CFX_GrowOnlyPool(IFX_Allocator* pAllocator, size_t trunk_size)
256 m_pAllocator = pAllocator ? pAllocator : &g_pDefFoxitMgr->m_DefAllocator.m_Allocator;
267 void CFX_GrowOnlyPool::SetAllocator(IFX_Allocator* pAllocator)
270 m_pAllocator = pAllocator ? pAllocator : &g_pDefFoxitMgr->m_DefAllocator.m_Allocator;