Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
|
|
#ifdef GM_USE_MEMORY
|
|
|
|
#include <cassert>
|
|
|
|
//------------------------------------------------------------------------------
|
|
inline GMMemoryManager::SMemoryTrack* GMMemoryManager::GetFreeTracker()
|
|
{
|
|
if ( NULL == m_pAvailableTrackerList )
|
|
{
|
|
AllocateTrackerBlock() ;
|
|
}
|
|
|
|
assert( NULL != m_pAvailableTrackerList && "Allocate tracker block failed !!" ) ;
|
|
|
|
SMemoryTrack* pTrack = m_pAvailableTrackerList ;
|
|
m_pAvailableTrackerList = m_pAvailableTrackerList->m_pNext ;
|
|
return pTrack ;
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
inline GMMemoryManager::STimestamp* GMMemoryManager::GetFreeTimestamp()
|
|
{
|
|
if ( NULL == m_pAvailableTimestampList )
|
|
{
|
|
AllocateTimestampBlock() ;
|
|
}
|
|
|
|
assert( NULL != m_pAvailableTimestampList && "Allocate timestamp block failed !!" ) ;
|
|
|
|
STimestamp* pStamp = m_pAvailableTimestampList ;
|
|
m_pAvailableTimestampList = m_pAvailableTimestampList->m_pNext ;
|
|
return pStamp ;
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
#endif // GM_USE_MEMORY
|