For memory testing

This commit is contained in:
Maschell 2023-03-21 22:58:56 +01:00
parent 3c86e75e75
commit 62b3d98cc1

View File

@ -156,6 +156,8 @@ WUMS_APPLICATION_STARTS() {
OSReport("Running FunctionPatcherModule " MODULE_VERSION_FULL "\n"); OSReport("Running FunctionPatcherModule " MODULE_VERSION_FULL "\n");
gFunctionAddressProvider->resetHandles();
// Now we can update the pointer with the "real" functions // Now we can update the pointer with the "real" functions
gMEMAllocFromDefaultHeapExForThreads = MEMAllocFromDefaultHeapEx; gMEMAllocFromDefaultHeapExForThreads = MEMAllocFromDefaultHeapEx;
gMEMFreeToDefaultHeapForThreads = MEMFreeToDefaultHeap; gMEMFreeToDefaultHeapForThreads = MEMFreeToDefaultHeap;
@ -178,9 +180,7 @@ WUMS_APPLICATION_STARTS() {
WUMS_APPLICATION_REQUESTS_EXIT() { WUMS_APPLICATION_REQUESTS_EXIT() {
deinitLogging(); deinitLogging();
} }
WUMS_APPLICATION_ENDS() {
gFunctionAddressProvider->resetHandles();
}
WUMS_EXPORT_FUNCTION(FunctionPatcherPatchFunction); WUMS_EXPORT_FUNCTION(FunctionPatcherPatchFunction);
WUMS_EXPORT_FUNCTION(FunctionPatcherRestoreFunction); WUMS_EXPORT_FUNCTION(FunctionPatcherRestoreFunction);