Lines Matching refs:alignment
109 void* FrameHeap::Alloc( u32 size, int alignment ) in Alloc() argument
116 NW_ASSERT( alignment % MIN_ALIGNMENT == 0 ); in Alloc()
117 NW_ASSERT( (Abs(alignment) & (Abs(alignment) - 1)) == 0 ); in Alloc()
118 NW_ASSERT( MIN_ALIGNMENT <= Abs(alignment) ); in Alloc()
129 if ( alignment >= 0 ) // ヒープ先頭から確保 in Alloc()
131 memory = AllocFromHead( size, alignment ); in Alloc()
135 memory = AllocFromTail( size, -alignment ); in Alloc()
156 void* FrameHeap::AllocFromHead( u32 size, int alignment ) in AllocFromHead() argument
158 void* newBlock = RoundUp( mHeadAllocator, (u32)alignment ); in AllocFromHead()
189 void* FrameHeap::AllocFromTail( u32 size, int alignment ) in AllocFromTail() argument
192 AddOffsetToPtr( mTailAllocator, -static_cast<s32>(size) ), static_cast<u32>(alignment) ); in AllocFromTail()
293 u32 FrameHeap::GetAllocatableSize( int alignment ) in GetAllocatableSize() argument
297 NW_ASSERT( alignment % MIN_ALIGNMENT == 0 ); in GetAllocatableSize()
298 NW_ASSERT( (Abs( alignment ) & (Abs( alignment ) - 1)) == 0 ); in GetAllocatableSize()
299 NW_ASSERT( MIN_ALIGNMENT <= Abs( alignment ) ); in GetAllocatableSize()
301 alignment = Abs( alignment ); in GetAllocatableSize()
308 const void* block = RoundUp( mHeadAllocator, (u32)alignment ); in GetAllocatableSize()