Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 336 vs 337 for /trunk/Source Code/Platform/DataTypes/PlatformDefines.cpp

Diff revisions: vs.
  @@ -50,55 +50,55 @@
50 50
51 51 #if defined(_DEBUG)
52 52 void* operator new( size_t size ) {
53 - void* ptr = malloc( size );
54 - Divide::MemoryManager::log_new( ptr, size, " allocation outside of macro ", 0 );
55 - return ptr;
53 + void* ptr = malloc( size );
54 + Divide::MemoryManager::log_new( ptr, size, " allocation outside of macro ", 0 );
55 + return ptr;
56 56 }
57 57
58 58 void operator delete( void *ptr ) {
59 59 Divide::MemoryManager::log_delete( ptr );
60 - free( ptr );
60 + free( ptr );
61 61 }
62 62
63 63 void* operator new[]( size_t size ) {
64 - void* ptr = malloc( size );
64 + void* ptr = malloc( size );
65 65 Divide::MemoryManager::log_new( ptr, size, " array allocation outside of macro ", 0 );
66 - return ptr;
66 + return ptr;
67 67 }
68 68
69 69 void operator delete[]( void *ptr ) {
70 70 Divide::MemoryManager::log_delete( ptr );
71 - free( ptr );
71 + free( ptr );
72 72 }
73 73
74 74 void* operator new( size_t size,
75 75 char* zFile,
76 76 Divide::I32 nLine ) {
77 - void* ptr = malloc( size );
77 + void* ptr = malloc( size );
78 78 Divide::MemoryManager::log_new( ptr, size, zFile, nLine );
79 - return ptr;
79 + return ptr;
80 80 }
81 81
82 82 void operator delete( void* ptr,
83 83 char* zFile,
84 84 Divide::I32 nLine ) {
85 85 Divide::MemoryManager::log_delete( ptr );
86 - free( ptr );
86 + free( ptr );
87 87 }
88 88
89 89 void* operator new[]( size_t size,
90 90 char* zFile,
91 91 Divide::I32 nLine ) {
92 - void* ptr = malloc( size );
92 + void* ptr = malloc( size );
93 93 Divide::MemoryManager::log_new( ptr, size, zFile, nLine );
94 - return ptr;
94 + return ptr;
95 95 }
96 96
97 97 void operator delete[]( void* ptr,
98 98 char* zFile,
99 99 Divide::I32 nLine ) {
100 100 Divide::MemoryManager::log_delete( ptr );
101 - free( ptr );
101 + free( ptr );
102 102 }
103 103 #endif
104 104
  @@ -108,9 +108,9 @@
108 108 Divide::U32 debugFlags,
109 109 const char* file,
110 110 Divide::I32 line ) {
111 - void* ptr = malloc( size );
111 + void* ptr = malloc( size );
112 112 Divide::MemoryManager::log_new( ptr, size, file, line );
113 - return ptr;
113 + return ptr;
114 114 }
115 115
116 116 void operator delete[]( void* ptr,
  @@ -120,7 +120,7 @@
120 120 const char* file,
121 121 Divide::I32 line ) {
122 122 Divide::MemoryManager::log_delete( ptr );
123 - free( ptr );
123 + free( ptr );
124 124 }
125 125
126 126 void* operator new[]( size_t size,
  @@ -131,11 +131,11 @@
131 131 Divide::U32 debugFlags,
132 132 const char* file,
133 133 Divide::I32 line ) {
134 - // this allocator doesn't support alignment
135 - assert( alignment <= 8 );
136 - void* ptr = malloc( size );
134 + // this allocator doesn't support alignment
135 + assert( alignment <= 8 );
136 + void* ptr = malloc( size );
137 137 Divide::MemoryManager::log_new( ptr, size, file, line );
138 - return ptr;
138 + return ptr;
139 139 }
140 140
141 141 void operator delete[]( void* ptr,
  @@ -147,7 +147,7 @@
147 147 const char* file,
148 148 Divide::I32 line ) {
149 149 Divide::MemoryManager::log_delete( ptr );
150 - free( ptr );
150 + free( ptr );
151 151 }
152 152
153 153 // E
  @@ -156,8 +156,8 @@
156 156 const char* pFormat,
157 157 va_list arguments ) {
158 158 #ifdef _MSC_VER
159 - return _vsnprintf( pDestination, n, pFormat, arguments );
159 + return _vsnprintf( pDestination, n, pFormat, arguments );
160 160 #else
161 - return vsnprintf( pDestination, n, pFormat, arguments );
161 + return vsnprintf( pDestination, n, pFormat, arguments );
162 162 #endif
163 163 }