vezel-dev / ruptura

A Windows DLL injection, function interception, and memory manipulation library for .NET.
https://docs.vezel.dev/ruptura
BSD Zero Clause License
37 stars 2 forks source link

Implement more space-efficient code managers #28

Open alexrp opened 2 years ago

alexrp commented 2 years ago

SimpleCodeManager is functional but really not great. Due to the huge allocation granularity on Windows, it will cause considerable address space fragmentation when hooking multiple functions. This is a serious problem for us because, unlike the average 64-bit application, we actually need our code allocations to be near the code we're hooking.

We need two additional code managers:

Maybe also rename SimpleCodeManager to something like SparseCodeManager. Or just nuke it. 🤷

alexrp commented 2 years ago

PageCodeManager done in 0acd47dbfbfe20e7cf5ff3d7c68412e54a58aa29. SimpleCodeManager was nuked.