Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heaphook 関連の課題一覧 #258

Open
veqcc opened this issue Nov 5, 2024 · 1 comment
Open

heaphook 関連の課題一覧 #258

veqcc opened this issue Nov 5, 2024 · 1 comment
Assignees

Comments

@veqcc
Copy link
Contributor

veqcc commented Nov 5, 2024

分散した issue になっていたのでまとめました。

  • 0x40000000000 以降のメモリを順に使っていくようにハードコードしているが、これが本当に正しいかを深く調査していない。Linux のどこかにそういうドキュメントがあった気がするので、探して裏付けしておく。
  • align されたアドレスの realloc は align すべきかもしれない。仕様を確認する。
  • パフォーマンス改善。heaphook だけで結構処理が重い
    • hooked の分岐を減らせないか
    • よく呼び出される関数を、コンパイラにヒントを出すことで最適化できないか。[#hot] などで実現?
    • thread caching メモリアロケータの利用検討
@bdm-k
Copy link
Contributor

bdm-k commented Feb 25, 2025

0x40000000000 以降のメモリを順に使っていくようにハードコードしているが、これが本当に正しいかを深く調査していない。Linux のどこかにそういうドキュメントがあった気がするので、探して裏付けしておく。

ドキュメントを見つけられたわけではないですが、Position-Independent Executable で ASLR が有効な場合、0x500000000000 (0x40000000000 より 1 桁大きい) 以降のアドレスしか使われていなさそうです。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants