generated from gottyduke/PluginTemplate
-
Notifications
You must be signed in to change notification settings - Fork 6
Hooking
DK edited this page Sep 24, 2023
·
1 revision
Trampoline allocation is commented out by default. Before committing any action that requires a trampoline space, e.g. write_call
, write_branch
, dku::Hook
, it must be enabled.
//SFSE::AllocTrampoline(1 << 10);
The default allocation space is 1024 bytes, this value is set merely for the sake of debug build and testing. To adjust the final space needed, check the plugin log result and allocate accordingly.
[26][debug](Trampoline.cpp:73) Default Trampoline => 28B / 1024B (02.73%)
[24][debug](Trampoline.cpp:73) Default Trampoline => 32B / 1024B (03.12%)
[23][debug](Trampoline.cpp:73) Default Trampoline => 38B / 1024B (03.71%)
[22][debug](Trampoline.cpp:73) Default Trampoline => 42B / 1024B (04.10%)
[22][debug](Trampoline.cpp:73) Default Trampoline => 62B / 1024B (06.05%)
[22][debug](Trampoline.cpp:73) Default Trampoline => 67B / 1024B (06.54%)