{"id":3215,"date":"2020-10-26T16:15:35","date_gmt":"2020-10-26T08:15:35","guid":{"rendered":"https:\/\/www.aoisnow.net\/blog\/?p=3215"},"modified":"2020-10-26T16:15:35","modified_gmt":"2020-10-26T08:15:35","slug":"tont-33423-globalwire-%e7%9a%84%e5%90%8d%e5%ad%97%e6%98%af%e6%80%8e%e4%b9%88%e6%9d%a5%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.aoisnow.net\/blog\/archives\/3215","title":{"rendered":"TONT 33423 GlobalWire \u7684\u540d\u5b57\u662f\u600e\u4e48\u6765\u7684\uff1f"},"content":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20051108-05\/?p=33423\" target=\"_blank\" rel=\"noopener\">https:\/\/devblogs.microsoft.com\/oldnewthing\/20051108-05\/?p=33423<\/a><\/p>\n<p>John Elliott wondered why the GlobalWire function was called GlobalWire.<\/p>\n<p>John Elliott \u60f3\u77e5\u9053\u4e3a\u4ec0\u4e48 GlobalWire \u51fd\u6570\u8d77\u4e86\u8fd9\u4e48\u4e2a\u540d\u5b57\u3002<\/p>\n<p>First, some background for those who never had to write 16-bit Windows programs. The GlobalWire function was similar to the 16-bit GlobalLock function, except that it had the bonus feature of relocating the memory to the lowest available linear address. You used this function as a courtesy if you intended to leave the memory locked for a long time. Moving it to the edge of the address space means that it is unlikely to become an obstacle in the middle of the address space which would otherwise prevent future large memory allocations from succeeding.<\/p>\n<p>\u9996\u5148\uff0c\u7ed9\u4ece\u6765\u90fd\u4e0d\u9700\u8981\u64b0\u5199 16 \u4f4d Windows \u5e94\u7528\u7a0b\u5e8f\u7684\u4eba\u4e00\u70b9\u80cc\u666f\u8d44\u6599\u3002GlobalWire \u51fd\u6570\u4e0e 16 \u4f4d\u51fd\u6570 GlobalLock \u7c7b\u4f3c\uff0c\u4e0d\u8fc7\u8fd8\u6709\u5c06\u5185\u5b58\u5757\u79fb\u52a8\u5230\u53ef\u7528\u7684\u6700\u4f4e\u7ebf\u6027\u5730\u5740\u7684\u9644\u52a0\u4f5c\u7528\u3002\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\u610f\u5473\u7740\u4f60\u60f3\u8ba9\u67d0\u90e8\u5206\u5185\u5b58\u9501\u5b9a\u8f83\u957f\u7684\u4e00\u6bb5\u65f6\u95f4\u3002\u5c06\u5185\u5b58\u5757\u79fb\u52a8\u5230\u5730\u5740\u7a7a\u95f4\u7684\u8fb9\u7f18\uff0c\u4f7f\u5f97\u8fd9\u5757\u5185\u5b58\u4e0d\u4f1a\u6210\u4e3a\u4e0d\u4e0a\u4e0d\u4e0b\u5730\u6a2a\u4e98\u5728\u5730\u5740\u7a7a\u95f4\u7684\u4e00\u90e8\u5206\uff0c\u4ee5\u671f\u672a\u6765\u7684\u5927\u5757\u5185\u5b58\u5206\u914d\u4e0d\u4f1a\u5931\u8d25\u3002<\/p>\n<p>But why \u201cwire\u201d?<\/p>\n<p>\u4e0d\u8fc7\u300ewire\u300f\u8fd9\u4e2a\u5199\u6cd5\u53c8\u662f\u600e\u4e48\u56de\u4e8b\u5462\uff1f<\/p>\n<p>This employs a colloquial sense of the word \u201cwire\u201d as a verb which has lost its currency in the intervening years. To wire means to fasten securely in a very strong sense. It probably derives from the phrase \u201chard-wired\u201d, which means \u201cpermanently attached in circuitry\u201d. Therefore, \u201cwiring\u201d memory into place ensures that it doesn\u2019t move around.<\/p>\n<p>\u8fd9\u91cc\u662f\u501f\u7528\u4e86 wire \u8fd9\u4e2a\u8bcd\u4f5c\u4e3a\u52a8\u8bcd\u7684\u53e3\u8bed\u8bf4\u6cd5\uff0c\u800c\u8fd9\u79cd\u7528\u6cd5\u8fd9\u4e9b\u5e74\u5927\u6982\u9010\u6e10\u5f0f\u5fae\u4e86\u3002\u300eTo wire\u300f\u610f\u5473\u7740\u5c06\u67d0\u7269\u300e\u7d27\u7d27\u7ed1\u4f4f\u300f\u7684\u4e00\u79cd\u5f3a\u70c8\u8bed\u6c14\uff0c\u53ef\u80fd\u662f\u6765\u81ea\u77ed\u8bed\u300ehard-wired\u300f\uff0c\u542b\u4e49\u662f\u300e\u5728\u7535\u8def\u4e2d\u6c38\u4e45\u56fa\u5b9a\u300f\u3002\u7531\u6b64\uff0c\u5c06\u5185\u5b58\u300e\u6346\u7ed1\u300f\u5728\u67d0\u5904\u5c31\u662f\u671f\u671b\u5176\u4e0d\u4f1a\u5230\u5904\u4e71\u8dd1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/devblogs.microsoft.com\/oldnewthing\/2005110 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3215","post","type-post","status-publish","format-standard","hentry","category-tont_history"],"_links":{"self":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/comments?post=3215"}],"version-history":[{"count":0,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3215\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/media?parent=3215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/categories?post=3215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/tags?post=3215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}