//-------------------------------------------------------------------------------------- // Name: AllocateContiguousMemory() // Desc: Wrapper for XMemAlloc //-------------------------------------------------------------------------------------- static __forceinline void* AllocateContiguousMemory( DWORD Size, DWORD Alignment, DWORD Protection = XALLOC_MEMPROTECT_WRITECOMBINE ) { return XMemAlloc( Size, MAKE_XALLOC_ATTRIBUTES( 0, 0, 0, 0, eXALLOCAllocatorId_AtgResource, Alignment, Protection, 0, XALLOC_MEMTYPE_PHYSICAL ) ); }
static __forceinline void FreeContiguousMemory( void* pData ) { #if defined(_XBOX1) return D3D_FreeContiguousMemory(pData); #elif defined(_XBOX360) return XMemFree( pData, MAKE_XALLOC_ATTRIBUTES( 0, 0, 0, 0, eXALLOCAllocatorId_AtgResource, 0, 0, 0, XALLOC_MEMTYPE_PHYSICAL ) ); #endif }
static __forceinline void* AllocateContiguousMemory( DWORD Size, DWORD Alignment, DWORD Protection = XALLOC_MEMPROTECT_WRITECOMBINE ) { #if defined(_XBOX1) return D3D_AllocContiguousMemory(Size, Alignment); #elif defined(_XBOX360) return XMemAlloc( Size, MAKE_XALLOC_ATTRIBUTES( 0, 0, 0, 0, eXALLOCAllocatorId_AtgResource, Alignment, Protection, 0, XALLOC_MEMTYPE_PHYSICAL ) ); #endif }
//-------------------------------------------------------------------------------------- // Name: FreeContiguousMemory() // Desc: Wrapper for XMemFree //-------------------------------------------------------------------------------------- static __forceinline VOID FreeContiguousMemory( VOID* pData ) { return XMemFree( pData, MAKE_XALLOC_ATTRIBUTES( 0, 0, 0, 0, eXALLOCAllocatorId_AtgResource, 0, 0, 0, XALLOC_MEMTYPE_PHYSICAL ) ); }