mirror of
https://github.com/celisej567/source-engine.git
synced 2026-09-13 20:13:45 +03:00
amd64: fix mempool, utlbuffer align
This commit is contained in:
@@ -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