Skip to content

Commit

Permalink
SDK: Fix GMalloc scan in UnrealEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Nov 30, 2023
1 parent 285e07b commit 5cc7976
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions shared/sdk/FMalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ FMalloc* FMalloc::get() {
}
}

// ok at this point we're just using whatever function we can find...
// because GMalloc is basically referenced everywhere we can use most functions
// even if that function is just the CVar registration function for MaxObjectsNotConsideredByGC
if (!object_base_init_fn) {
object_base_init_fn = utility::find_function_from_string_ref(core_uobject, L"gc.MaxObjectsNotConsideredByGC");

if (!object_base_init_fn) {
object_base_init_fn = utility::find_function_from_string_ref(core_uobject, L"MaxObjectsNotConsideredByGC");
}
}

if (!object_base_init_fn) {
SPDLOG_ERROR("[FMalloc::get] Failed to find object base init function");
return nullptr;
Expand Down

0 comments on commit 5cc7976

Please sign in to comment.