{"id":3775,"date":"2013-03-31T22:24:11","date_gmt":"2013-03-31T13:24:11","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3775"},"modified":"2013-03-31T22:26:32","modified_gmt":"2013-03-31T13:26:32","slug":"x64-%e3%81%a7%e3%81%ae-32bit-%e3%82%a2%e3%83%89%e3%83%ac%e3%83%83%e3%82%b7%e3%83%b3%e3%82%b0%e3%82%92%e6%8d%95%e6%8d%89%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3775","title":{"rendered":"x64 Windows \u3067\u306e 32bit \u30a2\u30c9\u30ec\u30c3\u30b7\u30f3\u30b0\u3092\u6355\u6349\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u8302\u6728\u3055\u3093\u306b\u6559\u3048\u3066\u3082\u3089\u3063\u305f\u3053\u3068\u306a\u3093\u3067\u3059\u304c\u3002<\/p>\n<p>x64 \u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u300132bit \u30a2\u30c9\u30ec\u30c3\u30b7\u30f3\u30b0\u3092\u3057\u3066\u3044\u305f\u308a\u3001\u3046\u3063\u304b\u308a\u30dd\u30a4\u30f3\u30bf\u3092 32bit \u306b\u30ad\u30e3\u30b9\u30c8\u3057\u305f\u5f8c\u306b\u4f7f\u3063\u3066\u3057\u307e\u3063\u305f\u308a\u3059\u308b\u3068\u300132bit \u306e\u7bc4\u56f2\u3092\u8d85\u3048\u308b\u30dd\u30a4\u30f3\u30bf\u304c\u6e21\u3063\u3066\u304d\u305f\u3068\u304d\u306b\u3001\u5909\u306a\u3068\u3053\u308d\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u6b7b\u3093\u3067\u3057\u307e\u3044\u307e\u3059\u3002\uff08<a href=\"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3659\">\u4f8b<\/a>\uff09<\/p>\n<p><!--more--><\/p>\n<p>\u666e\u901a\u3001\u30e1\u30e2\u30ea\u306f\u4e0b\u4f4d\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u305f\u3081\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8d77\u52d5\u3057\u3066\u3082\u6700\u521d\u306e\u3046\u3061\u306f\u5927\u4e08\u592b\u3060\u3063\u305f\u308a\u3057\u3066\u5b9f\u884c\u6642\u306b\u306f\u591a\u5c11\u898b\u3064\u3051\u3065\u3089\u304b\u3063\u305f\u308a\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u3001<a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/windows\/hardware\/gg487503.aspx\">\u3053\u306e Microsoft \u306e\u30da\u30fc\u30b8<\/a>\u306b\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u3001\u30ec\u30b8\u30b9\u30c8\u30ea\u306e <code>HKLM\\System\\CurrentControlSet\\Control\\Session Manager\\Memory Management<\/code> \u30ad\u30fc\u306e\u4e0b\u306e <code>AllocationPreference<\/code> \u3068\u3044\u3046 DWORD \u5024\u3092 0x100000 \u306b\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u3067\u3042\u3089\u3086\u308b\u30e1\u30e2\u30ea\u5272\u308a\u5f53\u3066\u304c\u4e0a\u4f4d\u30a2\u30c9\u30ec\u30b9\u3001\u5177\u4f53\u7684\u306b\u306f 0x000007ffffffffff (8TB) \u304b\u3089\u4e0b\u4f4d\u306e\u65b9\u306b\u5411\u304b\u3063\u3066\u884c\u308f\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u4e0a\u306e\u554f\u984c\u3092\u767a\u898b\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u30dd\u30a4\u30f3\u30c8\u306a\u306e\u306f\u300c\u3042\u3089\u3086\u308b\u30e1\u30e2\u30ea\u5272\u308a\u5f53\u3066\u304c\u300d\u3068\u3044\u3046\u70b9\u3067\u3059\u3002VirtualAlloc() \u306b\u306f\u30e1\u30e2\u30ea\u3092\u4e0a\u4f4d\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u5272\u308a\u5f53\u3066\u308b MEM_TOP_DOWN \u3068\u3044\u3046\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u4ed6\u306e\u30e1\u30e2\u30ea\u5272\u308a\u5f53\u3066\u95a2\u6570\u3001\u4f8b\u3048\u3070 malloc() \u3084 GlobalAlloc() \u3084 HeapAlloc() \u306b\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4e0a\u306e\u30ec\u30b8\u30b9\u30c8\u30ea\u8a2d\u5b9a\u3092\u3059\u308b\u3068\u3001\u3053\u308c\u3089\u306e\u95a2\u6570\u3067\u3042\u3063\u3066\u3082\u4e0a\u4f4d\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u306f\u3001\u30b9\u30bf\u30c3\u30af\u9818\u57df\u3082\u4e0a\u4f4d\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u8a66\u3057\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<blockquote>\n<pre>#include &lt;stdio.h&gt;\r\n#include &lt;windows.h&gt;\r\n\r\n#define MEMSIZE (16 * 1024 * 1024)\r\n\r\nint main(void)\r\n{\r\n        int i;\r\n\r\n        printf(\"symbols:\\n\");\r\n        printf(\"main               = %p\\n\", main);\r\n        printf(\"malloc             = %p\\n\", malloc);\r\n        printf(\"VirtualAlloc       = %p\\n\", VirtualAlloc);\r\n\r\n        printf(\"\\n\");\r\n\r\n        printf(\"memory allocations:\\n\");\r\n        printf(\"main thread stack  = %p\\n\", &i);\r\n        printf(\"malloc             = %p\\n\",\r\n            malloc(MEMSIZE));\r\n        printf(\"GlobalAlloc        = %p\\n\",\r\n            GlobalAlloc(GPTR, MEMSIZE));\r\n        printf(\"HeapAlloc          = %p\\n\",\r\n            HeapAlloc(GetProcessHeap(), 0, MEMSIZE));\r\n        printf(\"VirtualAlloc       = %p\\n\",\r\n            VirtualAlloc(NULL, MEMSIZE, MEM_RESERVE, PAGE_NOACCESS));\r\n        printf(\"VirtualAlloc (MTD) = %p\\n\",\r\n            VirtualAlloc(NULL, MEMSIZE, MEM_RESERVE | MEM_TOP_DOWN, PAGE_NOACCESS));\r\n\r\n        return 0;\r\n}<\/pre>\n<\/blockquote>\n<p>\u3053\u308c\u3092\u666e\u901a\u306e\u72b6\u614b\u306e Windows 7 \u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u51fa\u529b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<blockquote>\n<pre>symbols:\r\nmain               = 0000000140001000\r\nmalloc             = 0000000140001130\r\nVirtualAlloc       = 0000000076BE67A0\r\n\r\nmemory allocations:\r\nmain thread stack  = 000000000012FEF0\r\nmalloc             = 00000000004C0040\r\nGlobalAlloc        = 00000000014D0040\r\nHeapAlloc          = 00000000024E0040\r\nVirtualAlloc       = 00000000034F0000\r\nVirtualAlloc (MTD) = 000007FFFEFB0000<\/pre>\n<\/blockquote>\n<p>\u4e0a\u306e\u30ec\u30b8\u30b9\u30c8\u30ea\u8a2d\u5b9a\u3092\u884c\u3063\u305f Windows 7 \u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u51fa\u529b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<blockquote>\n<pre>symbols:\r\nmain               = 0000000140001000\r\nmalloc             = 0000000140001130\r\nVirtualAlloc       = 00000000774E67A0\r\n\r\nmemory allocations:\r\nmain thread stack  = 000007FFFFF8FEF0\r\nmalloc             = 000007FFFEBE0040\r\nGlobalAlloc        = 000007FFFDBD0040\r\nHeapAlloc          = 000007FFFCBC0040\r\nVirtualAlloc       = 000007FFFBBC0000\r\nVirtualAlloc (MTD) = 000007FFFABC0000<\/pre>\n<\/blockquote>\n<p>\u6b8b\u5ff5\u306a\u304c\u3089\u3001DLL \u306e\u914d\u7f6e\u7b49\u306f\u4e0a\u4f4d\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u306b\u306f\u306a\u3089\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u3001\u95a2\u6570\u30dd\u30a4\u30f3\u30bf\u306b\u95a2\u3057\u3066\u306f\u52b9\u679c\u306f\u3042\u308a\u307e\u305b\u3093\uff08\u901a\u5e38\u901a\u308a\uff09\u3002<\/p>\n<p>\u6ce8\u610f\u70b9\u3068\u3057\u3066\u306f\u300c\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u3067\u300d\u52b9\u679c\u304c\u3042\u308b\u305f\u3081\u3001\u51fa\u6765\u306e\u60aa\u3044\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u3042\u308b\u3068\u901a\u5e38\u306e\u4f7f\u7528\u306b\u652f\u969c\u304c\u51fa\u308b\u3053\u3068\u304c\u3042\u308b\u70b9\u3067\u3059\u3002\u8302\u6728\u3055\u3093\u306f\u67d0\u793e\u306e\u30d7\u30ea\u30f3\u30bf\u306e\u30c9\u30e9\u30a4\u30d0\u306b\u554f\u984c\u304c\u3042\u3063\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3068\u8a00\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8302\u6728\u3055\u3093\u306b\u6559\u3048\u3066\u3082\u3089\u3063\u305f\u3053\u3068\u306a\u3093\u3067\u3059\u304c\u3002 x64 \u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u300132bit \u30a2\u30c9\u30ec\u30c3\u30b7\u30f3\u30b0\u3092\u3057\u3066\u3044\u305f\u308a\u3001\u3046\u3063\u304b\u308a\u30dd\u30a4\u30f3\u30bf\u3092 32bit \u306b\u30ad\u30e3\u30b9\u30c8\u3057\u305f\u5f8c\u306b\u4f7f\u3063\u3066\u3057\u307e\u3063\u305f\u308a\u3059\u308b\u3068\u300132bit \u306e\u7bc4\u56f2\u3092\u8d85\u3048\u308b\u30dd\u30a4\u30f3\u30bf\u304c\u6e21\u3063 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-3775","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3775"}],"version-history":[{"count":7,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3775\/revisions"}],"predecessor-version":[{"id":3782,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3775\/revisions\/3782"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3775"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}