mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
amd64: fix mempool, utlbuffer align
This commit is contained in:
+6
-1
@@ -41,7 +41,12 @@ CUtlMemoryPool::CUtlMemoryPool( int blockSize, int numElements, int growMode, co
|
||||
}
|
||||
#endif
|
||||
|
||||
m_nAlignment = ( nAlignment != 0 ) ? nAlignment : 1;
|
||||
#ifdef PLATFORM_64BITS
|
||||
m_nAlignment = ( nAlignment != 0 ) ? nAlignment : 8;
|
||||
#else
|
||||
m_nAlignment = ( nAlignment != 0 ) ? nAlignment : 4;
|
||||
#endif
|
||||
|
||||
Assert( IsPowerOfTwo( m_nAlignment ) );
|
||||
m_BlockSize = blockSize < sizeof(void*) ? sizeof(void*) : blockSize;
|
||||
m_BlockSize = AlignValue( m_BlockSize, m_nAlignment );
|
||||
|
||||
Reference in New Issue
Block a user