NyaRuRuさんのところを読んでいたら、2003server/Vistaではhotpatchが可能とのこと。(話題が二年遅れ) 要するに DLL のエクスポート関数の先頭を jmp 命令で書き換えてしまうという,古典的な方法の模様. (snipped) これを実現するには DLL のエクスポート関数の先頭が 2 byte 命令でないと厄介なため,コンパイラレベルで考慮してあげる必要があって,実際最近の Visual C++ にはこんなオプションが追加されています. Hot-patching - NyaRuRuの日記 Microsoftが提供するhotfixが再起動不要になるというだけで、ユーザーが作成するDLLにも対応しているわけではないようだが、コンパイルオプション自体はVC2005からあるみたい。 /hotpatchを試してみたところ、アセンブリソースレベルでは関数の先頭に「npad
Vx32: portable, efficient, safe execution of untrusted x86 code Bryan Ford Russ Cox Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology About Vx32 is a user-mode library that can be linked into arbitrary applications that wish to create secure, isolated execution environments in which to run untrusted extensions or plug-ins implemented as native x86 code.
諸事情あって、ふと前に読んだドキュメントに書いてあった細かいことが気になった。いやいつも細かいけど。 const char* const p = "ABC";より const char q[] = "ABC";のほうがいいのか?的な話。後者の方が良いらしいので、確認するととともに、すぐになんでも書くのはどうなんだと思いつつも無駄に細かく解説。いろいろ間違ってたらゴメンナサイ。C言語入門? 先に結論 共有ライブラリやPIEな実行ファイルを作る場合は、後者の書き方(const char q[] = "xxx")のほうが良さそうですね。PIEじゃない単なる実行ファイルを作るときは、最適化かけるならあんまりかわらないかも。 比較1) コンパイル時の最適化の効きやすさ 最適化といってもいろいろありますが、↓に限って言えば、const char q[] のほうが効きやすいようですね。 gcc vers
memcpy performance abstract Normal usage of memcpy() with gcc presents serious performance issues. Implications and some possible avoidance measures are discussed for both 32- and 64-bit builds background linux gcc carries on the Unix tradition from the early days of C, when the run-time libraries weren't considered as part of the compiler. Thus, there is little coordination between compiler and
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く