Skip to content

Commit 671ae27

Browse files
authored
Merge pull request #6 from InfiniteC0re/master
Support memory profiling
2 parents 3c3c7c1 + 2427635 commit 671ae27

102 files changed

Lines changed: 730 additions & 107 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

OpenJPOG/Source/AOptions.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#include "AOptions.h"
22
#include "PPropertyParser/PPropertyReader.h"
33

4+
//-----------------------------------------------------------------------------
5+
// Enables memory debugging.
6+
// Note: Should be the last include!
7+
//-----------------------------------------------------------------------------
8+
#include <TKernel/TMemoryDebugOn.h>
9+
410
TOSHI_NAMESPACE_USING
511

612
TPCCHAR AOptions::sm_szOptionsDir = TNULL;

OpenJPOG/Source/ARenderer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#include "ARenderer.h"
22
#include "main.h"
33

4+
//-----------------------------------------------------------------------------
5+
// Enables memory debugging.
6+
// Note: Should be the last include!
7+
//-----------------------------------------------------------------------------
8+
#include <TKernel/TMemoryDebugOn.h>
9+
410
TOSHI_NAMESPACE_USING
511

612
IMPLEMENT_DYNCREATE(ARenderer, TTask)

OpenJPOG/Source/ASoundManager.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#include "ASoundManager.h"
22

3+
//-----------------------------------------------------------------------------
4+
// Enables memory debugging.
5+
// Note: Should be the last include!
6+
//-----------------------------------------------------------------------------
7+
#include <TKernel/TMemoryDebugOn.h>
8+
39
TOSHI_NAMESPACE_USING
410

511
IMPLEMENT_DYNCREATE(ASoundManager, TObject);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#include "AVibrationManager.h"
22

3+
//-----------------------------------------------------------------------------
4+
// Enables memory debugging.
5+
// Note: Should be the last include!
6+
//-----------------------------------------------------------------------------
7+
#include <TKernel/TMemoryDebugOn.h>
8+
39
TOSHI_NAMESPACE_USING
410

511
IMPLEMENT_DYNCREATE(AVibrationManager, TTask);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
#include "AGUIGameHUD.h"
2+
3+
//-----------------------------------------------------------------------------
4+
// Enables memory debugging.
5+
// Note: Should be the last include!
6+
//-----------------------------------------------------------------------------
7+
#include <TKernel/TMemoryDebugOn.h>

OpenJPOG/Source/GUI/AGUISystem.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#include "AGUISystem.h"
22
#include "main.h"
33

4+
//-----------------------------------------------------------------------------
5+
// Enables memory debugging.
6+
// Note: Should be the last include!
7+
//-----------------------------------------------------------------------------
8+
#include <TKernel/TMemoryDebugOn.h>
9+
410
TOSHI_NAMESPACE_USING
511

612
IMPLEMENT_DYNCREATE(AGUISystem, TTask)

OpenJPOG/Source/Movie/ABINKMoviePlayer.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
#include "TKernel/TManagedPointer.h"
44
#include "TRenderD3D/TRenderD3DInterface.h"
55

6+
//-----------------------------------------------------------------------------
7+
// Enables memory debugging.
8+
// Note: Should be the last include!
9+
//-----------------------------------------------------------------------------
10+
#include <TKernel/TMemoryDebugOn.h>
11+
612
TOSHI_NAMESPACE_USING
713

814
static U32 s_iPlayForegroundFast = 0;
@@ -207,7 +213,7 @@ TBOOL ABINKMoviePlayer::InitializeVideoResource()
207213
textureFormatSize = 8;
208214
}
209215
size *= 256 * 256;
210-
TPVOID buffer = tmalloc(size, TNULL, -1);
216+
TPVOID buffer = tmalloc(size);
211217
TSystem::MemSet(buffer, 0xFF, size);
212218
m_pTextures[2] = factory->CreateEx(buffer, size, 256, 256, 1, textureFormat, textureFormatSize);
213219
m_pTextures[2]->SetAddressModeMode(TTextureResource::ADDRESSMODE_CLAMP);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
#include "AMoviePlayer.h"
2+
3+
//-----------------------------------------------------------------------------
4+
// Enables memory debugging.
5+
// Note: Should be the last include!
6+
//-----------------------------------------------------------------------------
7+
#include <TKernel/TMemoryDebugOn.h>

OpenJPOG/Source/States/AFrontEndSplashState.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
#include "GUI/AGUISystem.h"
33
#include "main.h"
44

5+
//-----------------------------------------------------------------------------
6+
// Enables memory debugging.
7+
// Note: Should be the last include!
8+
//-----------------------------------------------------------------------------
9+
#include <TKernel/TMemoryDebugOn.h>
10+
511
TOSHI_NAMESPACE_USING
612

713
IMPLEMENT_DYNCREATE(AFrontEndSplashState, AFrontendState)

OpenJPOG/Source/States/AFrontEndState.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
#include "main.h"
33
#include "AGameState.h"
44

5+
//-----------------------------------------------------------------------------
6+
// Enables memory debugging.
7+
// Note: Should be the last include!
8+
//-----------------------------------------------------------------------------
9+
#include <TKernel/TMemoryDebugOn.h>
10+
511
TOSHI_NAMESPACE_USING
612

713
IMPLEMENT_DYNAMIC(AFrontendState, ARootState)

0 commit comments

Comments
 (0)