add detour_free_unused_regions
This commit is contained in:
parent
7c25e72f15
commit
67a74ef7e1
2 changed files with 20 additions and 1 deletions
|
|
@ -205,11 +205,20 @@ bool detour_set_ignore_too_small(bool value);
|
|||
/// @brief Toggle whether to free memory allocated for trampoline regions when they are empty.
|
||||
///
|
||||
/// Default is `true` - free unused regions upon commit.<br/>
|
||||
/// `false` means they are not freed upon commit. Note that there is no way to manually free unused regions.
|
||||
/// `false` means they are not freed upon commit. See also `detour_free_unused_regions`.
|
||||
///
|
||||
/// @returns the previous state of the flag
|
||||
bool detour_set_retain_regions(bool value);
|
||||
|
||||
/// @brief Frees unused trampoline memory regions
|
||||
///
|
||||
/// @note Must be called from within a transaction to maintain thread saefty.
|
||||
///
|
||||
/// @returns `err_none` on success, else:<br/>
|
||||
/// * `detour_err_wrong_thread` if the calling thread is not the owner of the transaction, or if there is no
|
||||
/// transaction. See `detour_transaction_begin`.
|
||||
mach_error_t detour_free_unused_regions();
|
||||
|
||||
/// @brief Sets the lower bound of the memory area that will not be used for detours trampoline regions
|
||||
///
|
||||
/// Default is `0x70000000`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue