Skip to content

Commit

Permalink
darwin-module: Optimize exports enumeration slightly
Browse files Browse the repository at this point in the history
By preallocating the prefix string ahead of trie iteration.
  • Loading branch information
oleavr committed Sep 21, 2023
1 parent 42f5afe commit 35c4e42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gum/gumdarwinmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2860,7 +2860,7 @@ gum_exports_trie_foreach (const guint8 * exports,
ctx.func = func;
ctx.user_data = user_data;

ctx.prefix = g_string_new ("");
ctx.prefix = g_string_sized_new (1024);
ctx.exports = exports;
ctx.exports_end = exports_end;

Expand Down

0 comments on commit 35c4e42

Please sign in to comment.