implementing pagesize profiling and part of patching
implemented preliminary patching