45 align = (align >
sizeof(
UPInt)) ? align :
sizeof(
UPInt);
50 aligned = (
UPInt(p) + align-1) & ~(align-1);
53 *(((
UPInt*)aligned)-1) = aligned-p;
55 return (
void*)aligned;
77 #if defined(OVR_CC_MSVC) && defined(_CRTDBG_MAP_ALLOC)
78 return _malloc_dbg(size, _NORMAL_BLOCK, file, line);
87 return realloc(p, newSize);
virtual void * Realloc(void *p, UPInt newSize)
virtual void * Alloc(UPInt size)
virtual void Free(void *p)
virtual void * AllocDebug(UPInt size, const char *file, unsigned line)
static Allocator * pInstance
virtual void * Alloc(UPInt size)=0
virtual void FreeAligned(void *p)
virtual void Free(void *p)=0
virtual void * AllocAligned(UPInt size, UPInt align)
#define OVR_UNUSED2(a1, a2)