ユーザ用ツール

サイト用ツール


appendix:garbagecollectorを止める方法

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
appendix:garbagecollectorを止める方法 [2022/03/07 09:49]
fumble
appendix:garbagecollectorを止める方法 [2022/03/07 09:58] (現在)
fumble
行 14: 行 14:
 void 心眼() void 心眼()
 { {
-    auto module = LoadLibrary(lpszMonoParh);+    auto module = ::LoadLibrary(lpszMonoParh);
     if (module != nullptr)     if (module != nullptr)
     {     {
-        auto getheapsize = (gcgetheapsize)GetProcAddress(module, "mono_gc_get_heap_size");+        auto getheapsize = (gcgetheapsize)::GetProcAddress(module, "mono_gc_get_heap_size");
         auto heapsize = getheapsize();         auto heapsize = getheapsize();
-        auto disable = (gcenabledisable)((__int64)GetProcAddress(module, "mono_gc_get_heap_size") + 8i64); +        auto disable = (gcenabledisable)((__int64)::GetProcAddress(module, "mono_gc_get_heap_size") + 8i64); 
-        auto enable = (gcenabledisable)((__int64)GetProcAddress(module, "mono_gc_get_heap_size") + 16i64);+        auto enable = (gcenabledisable)((__int64)::GetProcAddress(module, "mono_gc_get_heap_size") + 16i64);
         disable();         disable();
         enable();         enable();
行 46: 行 46:
 </code>  </code> 
 実装順でそれぞれの関数にジャンプするようになっておるじゃろ。\\ 実装順でそれぞれの関数にジャンプするようになっておるじゃろ。\\
-しかもきれいに8バイトでパディングされて。\\+きれいに8バイトでパディングされておるじゃろ。\\
 mono_gc_get_heap_size\\ mono_gc_get_heap_size\\
 <code> <code>
行 59: 行 59:
 00007FFAA93DB1A0 E9 9B C6 13 00       jmp         00007FFAA9517840   00007FFAA93DB1A0 E9 9B C6 13 00       jmp         00007FFAA9517840  
 </code> </code>
-もうこれでわかるな?\\+今度こそこれでわかるな?\\
 飛んだ先が正しいかもちゃんとステップインして確認するのじゃぞ?\\ 飛んだ先が正しいかもちゃんとステップインして確認するのじゃぞ?\\
appendix/garbagecollectorを止める方法.1646614160.txt.gz · 最終更新: 2022/03/07 09:49 by fumble