File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
Core/Libraries/Source/WWVegas/WWLib Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ bool DbgHelpLoader::load()
5757 if (Inst == NULL )
5858 {
5959 // Cannot use new/delete here when this is loaded during game memory initialization.
60- void * p = sysAllocateDoNotZero ( sizeof (DbgHelpLoader));
60+ void * p = GlobalAlloc (GMEM_FIXED, sizeof (DbgHelpLoader));
6161 Inst = new (p) DbgHelpLoader ();
6262 }
6363
@@ -130,7 +130,7 @@ void DbgHelpLoader::unload()
130130 }
131131
132132 Inst->~DbgHelpLoader ();
133- sysFree (Inst);
133+ GlobalFree (Inst);
134134 Inst = NULL ;
135135}
136136
Original file line number Diff line number Diff line change 1818
1919#pragma once
2020
21- #include < cstdlib> // malloc, free
2221#include < cstddef> // std::size_t, std::ptrdiff_t
2322#include < new> // std::bad_alloc
2423
@@ -66,15 +65,15 @@ class system_allocator
6665 if (n > max_size ())
6766 throw std::bad_alloc ();
6867
69- void * p = sysAllocateDoNotZero ( n * sizeof (T));
68+ void * p = GlobalAlloc (GMEM_FIXED, n * sizeof (T));
7069 if (!p)
7170 throw std::bad_alloc ();
7271 return static_cast <pointer>(p);
7372 }
7473
7574 void deallocate (pointer p, size_type)
7675 {
77- sysFree (p);
76+ GlobalFree (p);
7877 }
7978
8079 void construct (pointer p, const T& val)
Original file line number Diff line number Diff line change 8080#endif // _MSC_VER
8181#endif // RTS_DEBUG
8282
83- extern void * sysAllocateDoNotZero (size_t numBytes);
84- extern void sysFree (void * p);
85-
8683#if !defined(DISABLE_GAMEMEMORY) // (gth) killing the Generals Memory Manager!
8784
8885#ifndef _OPERATOR_NEW_DEFINED_
You can’t perform that action at this time.
0 commit comments