Fix 64 bit, increase mm usage

This commit is contained in:
Vesa
2014-08-23 00:52:18 +03:00
parent 9c25be1bde
commit 75770b4d2e
12 changed files with 21 additions and 6 deletions

View File

@@ -106,7 +106,7 @@ void MemoryManager::free( void * ptr )
s_pointerMutex.lock();
if( ! s_pointerInfo.contains( ptr ) ) // if we have no info on ptr, fail loudly
{
qFatal( "MemoryManager.cpp: Couldn't find pointer info for pointer: %d", (int)ptr );
qFatal( "MemoryManager.cpp: Couldn't find pointer info for pointer: %d", (intptr_t)ptr );
}
PtrInfo p = s_pointerInfo[ptr];
s_pointerInfo.remove( ptr );
@@ -198,7 +198,7 @@ void MemoryPool::releaseChunks( void * ptr, int chunks )
{
m_mutex.lock();
int start = ( (int)ptr - (int)m_pool ) / MM_CHUNK_SIZE;
int start = ( (intptr_t)ptr - (intptr_t)m_pool ) / MM_CHUNK_SIZE;
if( start < 0 )
{
qFatal( "MemoryManager: error at releaseChunks() - corrupt pointer info?" );

View File

@@ -753,7 +753,10 @@ bool SampleBuffer::play( sampleFrame * _ab, handleState * _state,
}
}
if( tmp != NULL ) delete[] tmp;
if( tmp != NULL )
{
MM_FREE( tmp );
}
_state->setBackwards( is_backwards );
_state->setFrameIndex( play_frame );
@@ -795,7 +798,7 @@ sampleFrame * SampleBuffer::getSampleFragment( f_cnt_t _index,
return m_data + _index;
}
*_tmp = new sampleFrame[_frames];
*_tmp = MM_ALLOC( sampleFrame, _frames );
if( _loopmode == LoopOff )
{