{"id":1424,"date":"2018-06-20T20:06:29","date_gmt":"2018-06-20T12:06:29","guid":{"rendered":"https:\/\/damogame.cn:15443\/wordpress\/?p=1424"},"modified":"2018-06-20T20:06:29","modified_gmt":"2018-06-20T12:06:29","slug":"boost-interprocess%e4%bd%bf%e7%94%a8%e6%89%8b%e5%86%8c%e7%bf%bb%e8%af%91%e4%b9%8b%e5%8d%81%e4%ba%8c%ef%bc%8e%e6%9e%b6%e6%9e%84%e5%92%8c%e5%86%85%e9%83%a8%e5%ae%9e%e7%8e%b0%ef%bc%88architecture-and-int","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/1424","title":{"rendered":"Boost.Interprocess\u4f7f\u7528\u624b\u518c\u7ffb\u8bd1\u4e4b\u5341\u4e8c\uff0e\u67b6\u6784\u548c\u5185\u90e8\u5b9e\u73b0\uff08Architecture and internals\uff09"},"content":{"rendered":"<div class=\"article-title-box\">\n<h1 class=\"title-article\">Boost.Interprocess\u4f7f\u7528\u624b\u518c\u7ffb\u8bd1\u4e4b\u5341\u4e8c\uff0e\u67b6\u6784\u548c\u5185\u90e8\u5b9e\u73b0\uff08Architecture and internals\uff09<\/h1>\n<\/div>\n<div class=\"article-info-box\">\n<div class=\"article-bar-top d-flex\"><span class=\"time\">2017\u5e7405\u670804\u65e5 15:28:17<\/span><\/p>\n<div class=\"float-right\"><span class=\"read-count\">\u9605\u8bfb\u6570\uff1a479<\/span><\/div>\n<\/div>\n<\/div>\n<article>\n<div id=\"article_content\" class=\"article_content clearfix csdn-tracking-statistics\" data-pid=\"blog\" data-mod=\"popu_307\" data-dsm=\"post\">\n<div class=\"htmledit_views\">\n<h1><a name=\"t0\"><\/a><a target=\"_blank\">\u5341\u4e8c\uff0e\u67b6\u6784\u548c\u5185\u90e8\u5b9e\u73b0<\/a><\/h1>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\">\u57fa\u672c\u6307\u5357<\/p>\n<p>\u4ece\u5185\u5b58<a class=\"replace_word\" title=\"\u7b97\u6cd5\u4e0e\u6570\u636e\u7ed3\u6784\u77e5\u8bc6\u5e93\" href=\"http:\/\/lib.csdn.net\/base\/datastructure\" target=\"_blank\" rel=\"noopener\">\u7b97\u6cd5<\/a>\u5230\u6258\u7ba1\u5185\u5b58\u7247\u6bb5<\/p>\n<p>\u5206\u914d\u5668\u548c\u5bb9\u5668<\/p>\n<p>Boost.Interprocess\u7684\u6027\u80fd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a name=\"t1\"><\/a><a target=\"_blank\" name=\"t1\"><\/a><a target=\"_blank\">\u57fa\u672c\u6307\u5357<\/a><\/h2>\n<p>\u5f53\u6784\u5efaBoost.Interprocess<a class=\"replace_word\" title=\"\u5927\u578b\u7f51\u7ad9\u67b6\u6784\u77e5\u8bc6\u5e93\" href=\"http:\/\/lib.csdn.net\/base\/architecture\" target=\"_blank\" rel=\"noopener\">\u67b6\u6784<\/a>\u65f6\uff0c\u6211\u91c7\u7528\u4e86\u4e00\u4e9b\u57fa\u672c\u6307\u5357\uff0c\u5b83\u4eec\u88ab\u603b\u7ed3\u4e3a\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<ul type=\"disc\">\n<li>Boost.Interprocess\u81f3\u5c11\u80fd\u5728UNIX\u548cWindows\u7cfb\u7edf\u95f4\u79fb\u690d\u3002\u8fd9\u610f\u5473\u7740\u4e0d\u4ec5\u8981\u7edf\u4e00\u63a5\u53e3\uff0c\u8fd8\u6709\u884c\u4e3a\u3002\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48Boost.Interprocess\u4e3a\u5171\u4eab\u5185\u5b58\u548c\u547d\u540d\u540c\u6b65\u673a\u5236\u9009\u62e9\u4e86\u5185\u6838\u6216\u6587\u4ef6\u7cfb\u7edf\u6301\u4e45\u5316\u3002\u5171\u4eab\u5185\u5b58\u7684\u8fdb\u7a0b\u6301\u4e45\u5316\u4e5f\u662f\u53ef\u53d6\u7684\uff0c\u4f46\u5728UNIX\u7cfb\u7edf\u4e0b\u5b9e\u73b0\u8d77\u6765\u76f8\u5f53\u56f0\u96be\u3002<\/li>\n<li>Boost.Interprocess\u8fdb\u7a0b\u95f4\u540c\u6b65\u539f\u8bed\uff08primitives\uff09\u5e94\u8be5\u548c\u7ebf\u7a0b\u540c\u6b65\u539f\u8bed\u76f8\u540c\u3002Boost.Interprocess\u65e8\u5728\u6709\u4e00\u4e2a\u548cC++\u6807\u51c6\u7ebf\u7a0bAPI\u517c\u5bb9\u7684\u63a5\u53e3\u3002<\/li>\n<li>Boost.Interprocess\u5e94\u8be5\u662f\u6a21\u5757\u5316\u3001\u53ef\u5b9a\u5236\uff0c\u4f46\u9ad8\u6548\u7387\u7684\u3002\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48Boost.Interprocess\u57fa\u4e8e\u6a21\u677f\u548c\u5185\u5b58\u7b97\u6cd5\uff0c\u7d22\u5f15\u7c7b\u578b\u3001\u4e92\u65a5\u7c7b\u578b\u548c\u5176\u4ed6\u7c7b\u90fd\u662f\u6a21\u677f\u5316\u7684\u3002<\/li>\n<li>Boost.Interprocess\u67b6\u6784\u5e94\u8be5\u5141\u8bb8\u548c\u57fa\u4e8e\u7ebf\u7a0b\u7f16\u7a0b\u7684\u76f8\u540c\u7684\u5e76\u53d1\u6027\u3002\u4e0d\u540c\u7684\u4e92\u65a5\u6c34\u5e73\u88ab\u5b9a\u4e49\u4ee5\u4fbf\u5f53\u6269\u5c55\u4e00\u4e2a\u5171\u4eab\u5185\u5b58\u5411\u91cf\u65f6\uff0c\u4e00\u4e2a\u8fdb\u7a0b\u80fd\u591f\u540c\u65f6\u5206\u914d\u539f\u59cb\u5185\u5b58\uff0c\u5e76\u4e14\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u80fd\u5b89\u5168\u5730\u641c\u7d22\u4e00\u4e2a\u5177\u540d\u5bf9\u8c61\u3002<\/li>\n<li>Boost.Interprocess\u5bb9\u5668\u5b8c\u5168\u4e0d\u4e86\u89e3Boost.Interprocess\u3002\u6240\u6709\u5177\u4f53\u7684\u884c\u4e3a\u90fd\u5305\u542b\u5728\u7c7bSTL\u5206\u914d\u5668\u4e2d\u3002\u8fd9\u5141\u8bb8STL\u63d0\u4f9b\u5546\u8f7b\u5fae\u7684\u4fee\u6539\uff08\u6216\u8005\u66f4\u597d\u7684\u8bf4\u6cd5\uff0c\u6cdb\u5316\uff09\u5b83\u4eec\u6807\u51c6\u7684\u5bb9\u5668\u5b9e\u73b0\u5e76\u4e14\u83b7\u5f97\u4e00\u4e2a\u5b8c\u5168\u7684std::allocator\u548cboost::interprocess::allocator\u517c\u5bb9\u5bb9\u5668\u3002\u8fd9\u4e5f\u4f7f\u5f97Boost.Interprocess\u5bb9\u5668\u4e0e\u6807\u51c6\u7b97\u6cd5\u517c\u5bb9\u3002<\/li>\n<\/ul>\n<p>Boost.Interprocess\u6784\u5efa\u4e8e\u4e09\u4e2a\u57fa\u672c\u7c7b\u4e0a\uff1a\u5185\u5b58\u7b97\u6cd5\uff0c\u7247\u6bb5\u7ba1\u7406\u5668\uff0c\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\uff1a<\/p>\n<h2><a name=\"t2\"><\/a><a target=\"_blank\" name=\"t2\"><\/a><a target=\"_blank\">\u4ece\u5185\u5b58\u7b97\u6cd5\u5230\u6258\u7ba1\u5185\u5b58\u7247\u6bb5<\/a><\/h2>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\">\u5185\u5b58\u7b97\u6cd5\uff08The memory algorithm\uff09<\/p>\n<p>\u7247\u6bb5\u7ba1\u7406\u5668\uff08The segment manager\uff09<\/p>\n<p>Boost.Interprocess\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\uff08managed memory segments\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><a name=\"t3\"><\/a><a target=\"_blank\" name=\"t3\"><\/a><a target=\"_blank\">\u5185\u5b58\u7b97\u6cd5<\/a>\uff08The memory algorithm\uff09<\/h3>\n<p>memory algorithm\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u5b83\u88ab\u7f6e\u4e8e\u5171\u4eab\u5185\u5b58\/\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u7247\u6bb5\u7684\u5934\u51e0\u4e2a\u5b57\u8282\u4e2d\u3002memory algorithm\u80fd\u591f\u8fd4\u56de\u6b64\u7247\u6bb5\u7684\u90e8\u5206\u81f3\u7528\u6237\uff0c\u5e76\u6807\u8bb0\u5b83\u4eec\u4e3a\u5df2\u7528\uff0c\u5e76\u4e14\u7528\u6237\u80fd\u591f\u8fd4\u56de\u8fd9\u4e9b\u90e8\u5206\u81f3memory algorithm\u4ee5\u4fbfmemory algorithm\u518d\u6b21\u6807\u8bb0\u5b83\u4eec\u4e3a\u7a7a\u95f2\u3002\u5c3d\u7ba1\u6709\u4e00\u4e2a\u4f8b\u5916\uff1a\u4e00\u4e9b\u8d85\u8fc7\u5185\u5b58\u7b97\u6cd5\u5bf9\u8c61\u5c3e\u90e8\u7684\u5b57\u8282\u88ab\u4fdd\u7559\uff0c\u5e76\u4e14\u4e0d\u80fd\u88ab\u7528\u4e8e\u52a8\u6001\u5206\u914d\u3002\u8fd9\u4e9b\u201c\u4fdd\u7559\u201d\u533a\u57df\u5c06\u88ab\u7528\u4e8e\u653e\u7f6e\u5176\u4ed6\u989d\u5916\u7684\u5bf9\u8c61\u5728\u4e00\u4e2a\u4f17\u6240\u5468\u77e5\u7684\u5730\u65b9\u3002<\/p>\n<p>\u603b\u7ed3\u4e00\u4e0b\uff0cmemory algorithm\u5177\u6709\u548c\u6807\u51c6C\u5e93\u51fd\u6570malloc\/free\u76f8\u540c\u7684\u4f7f\u547d\uff0c\u4f46\u5b83\u4ec5\u80fd\u8fd4\u56de\u5176\u7f6e\u4e8e\u7684\u7247\u6bb5\u7684\u90e8\u5206\u3002\u4e00\u4e2a\u5185\u5b58\u7247\u6bb5\u7684\u5e03\u5c40\u53ef\u80fd\u662f\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/hi.csdn.net\/attachment\/201203\/1\/0_1330591414202A.gif\" alt=\"\" \/><\/p>\n<p>memory algorithm\u7167\u987e\u5230\u4e86\u5185\u5b58\u540c\u6b65\uff0c\u5c31\u597d\u50cfmalloc\/free\u4fdd\u8bc1\u4e24\u4e2a\u7ebf\u7a0b\u80fd\u540c\u65f6\u8c03\u7528malloc\/free\u3002\u5b83\u901a\u5e38\u91c7\u7528\u653e\u7f6e\u4e00\u4e2a\u8fdb\u7a0b\u95f4\u5171\u4eab\u7684\u4e92\u65a5\u91cf\u505a\u4e3amemory algorithm\u6210\u5458\u7684\u65b9\u5f0f\u5b9e\u73b0\u3002\u9700\u8981\u5c0f\u5fc3\u7684\u662fmemory algorithm\u5b8c\u5168\u4e0d\u4e86\u89e3\u5185\u5b58\u7247\u6bb5\uff08\u5982\u679c\u5b83\u662f\u5171\u4eab\u5185\u5b58\u3001\u5171\u4eab\u5185\u5b58\u6587\u4ef6\u7b49\u7b49\uff09\u3002\u5bf9memory algorithm\u6765\u8bf4\uff0c\u5185\u5b58\u7247\u6bb5\u4ec5\u662f\u4e00\u5757\u56fa\u5b9a\u5927\u5c0f\u7684\u5185\u5b58\u7f13\u51b2\u533a\u800c\u5df2\u3002<\/p>\n<p>memory algorithm\u4e5f\u662f\u5176\u4f59Boost.Interprocess\u6846\u67b6\uff08\u7247\u6bb5\u7ba1\u7406\u5668\u3001\u5206\u914d\u5668\u3001\u5bb9\u5668\u7b49\uff09\u7684\u4e00\u4e2a\u914d\u7f6e\u70b9\uff0c\u56e0\u4e3a\u5b83\u5b9a\u4e49\u4e86\u4e24\u79cd\u57fa\u672c\u7c7b\u578b\u505a\u4e3a\u6210\u5458\u7c7b\u578b\u5b9a\u4e49\uff1a<\/p>\n<div>\n<pre><\/pre>\n<div class=\"dp-highlighter bg_cpp\">\n<div class=\"bar\">\n<div class=\"tools\"><strong>[cpp]<\/strong>\u00a0<a class=\"ViewSource\" title=\"view plain\" href=\"http:\/\/blog.csdn.net\/great3779\/article\/details\/7310120#\" target=\"_blank\" rel=\"noopener\">view plain<\/a>\u00a0<a class=\"CopyToClipboard\" title=\"copy\" href=\"http:\/\/blog.csdn.net\/great3779\/article\/details\/7310120#\" target=\"_blank\" rel=\"noopener\">copy<\/a><\/p>\n<div><embed id=\"ZeroClipboardMovie_1\" src=\"https:\/\/csdnimg.cn\/public\/highlighter\/ZeroClipboard.swf\" type=\"application\/x-shockwave-flash\" width=\"16\" height=\"16\" align=\"middle\" name=\"ZeroClipboardMovie_1\" data-mce-fragment=\"1\"><\/embed><\/div>\n<div><embed id=\"ZeroClipboardMovie_3\" src=\"https:\/\/csdnimg.cn\/public\/highlighter\/ZeroClipboard.swf\" type=\"application\/x-shockwave-flash\" width=\"16\" height=\"16\" align=\"middle\" name=\"ZeroClipboardMovie_3\" data-mce-fragment=\"1\"><\/embed><\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<ol class=\"dp-cpp\" start=\"1\">\n<li class=\"alt\"><span class=\"keyword\">typedef<\/span>\u00a0<span class=\"comment\">\/*implementation\u00a0dependent*\/<\/span>\u00a0void_pointer;<\/li>\n<li><span class=\"keyword\">typedef<\/span>\u00a0<span class=\"comment\">\/*implementation\u00a0dependent*\/<\/span>\u00a0mutex_family;<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p>void_pointer\u7c7b\u578b\u5b9a\u4e49\u5b9a\u4e49\u4e86\u6307\u9488\u7c7b\u578b\uff0c\u5b83\u5c06\u88ab\u7528\u5728Boost.Interprocess\u6846\u67b6\uff08\u7247\u6bb5\u7ba1\u7406\u5668\u3001\u5206\u914d\u5668\u3001\u5bb9\u5668\u7b49\uff09\u4e2d\u3002\u5982\u679cmemoryalgorithm\u51c6\u5907\u653e\u7f6e\u5165\u6620\u5c04\u5728\u4e0d\u540c\u57fa\u5730\u5740\u4e0a\u7684\u5171\u4eab\u5185\u5b58\/\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u4e2d\u65f6\uff0c\u6b64\u6307\u9488\u7c7b\u578b\u5c06\u88ab\u5b9a\u4e49\u4e3aoffset_ptr&lt;void&gt;\u6216\u4e00\u4e2a\u7c7b\u4f3c\u7684\u76f8\u5bf9\u6307\u9488\u3002\u5982\u679cmemory algorithm\u5c06\u88ab\u4e0e\u56fa\u5b9a\u5730\u5740\u6620\u5c04\u4e00\u8d77\u4f7f\u7528\uff0cvoid_pointer\u80fd\u88ab\u5b9a\u4e49\u4e3avoid*\u3002<\/p>\n<p>Boost.Interprocess\u00a0memory algorithm\u5176\u4f59\u7684\u63a5\u53e3\u5728<a title=\"Writing a new shared memory allocation algorithm\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/interprocess\/customizing_interprocess.html#interprocess.customizing_interprocess.custom_interprocess_alloc\" target=\"_blank\" rel=\"noopener\">Writing a new shared memory allocation algorithm<\/a>\u00a0\u7ae0\u8282\u4e2d\u63cf\u8ff0\u3002\u505a\u4e3amemory algorithm\u7684\u4f8b\u5b50\uff0c\u4f60\u53ef\u4ee5\u770bsimple_seq_fit\u6216\u00a0rbtree_best_fit\u7c7b\u7684\u5b9e\u73b0\u3002<\/p>\n<h3><a name=\"t4\"><\/a><a target=\"_blank\" name=\"t4\"><\/a><a target=\"_blank\">\u7247\u6bb5\u7ba1\u7406\u5668\uff08The segment manager<\/a>\uff09<\/h3>\n<p>segment manager\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u5b83\u4e5f\u88ab\u7f6e\u4e8e\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\uff08\u5171\u4eab\u5185\u5b58\u3001\u5185\u5b58\u6620\u5c04\u6587\u4ef6\uff09\u7684\u5934\u51e0\u4e2a\u5b57\u8282\u4e2d\uff0c\u5b83\u6784\u5efa\u4e8ememory algorithm\u4e4b\u4e0a\uff0c\u63d0\u4f9b\u4e86\u66f4\u590d\u6742\u7684\u670d\u52a1\u3002\u4e3a\u4ec0\u4e48segment manager\u548cmemory algorithm\u80fd\u540c\u65f6\u7f6e\u4e8e\u7247\u6bb5\u7684\u5934\u51e0\u4e2a\u5b57\u8282\u4e2d\u5462\uff1f\u8fd9\u662f\u56e0\u4e3asegment manager\u5305\u542b\u4e86memory algorithm\uff1a\u771f\u76f8\u662fmemory algorithm\u5d4c\u5165\u5728segment manager\u4e2d\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/hi.csdn.net\/attachment\/201203\/1\/0_1330591417FJg1.gif\" alt=\"\" \/><\/p>\n<p>segment manager\u521d\u59cb\u5316memory algorithm\uff0c\u5e76\u4e14\u544a\u8bc9\u5185\u5b58\u7ba1\u7406\u5668\u5b83\u4e0d\u4f7f\u7528\u6b64\u90e8\u5206\u5185\u5b58\uff0c\u8fd9\u5757\u5185\u5b58\u7528\u4e8e\u5176\u4f59segment manager\u7684\u6210\u5458\u7684\u52a8\u6001\u5206\u914d\u3002segment manager\u7684\u5176\u4ed6\u6210\u5458\u662f\u4e00\u4e2a\u9012\u5f52\u4e92\u65a5\u91cf\uff08\u7531memory algorithm\u7684mutex_family::recursive_mutex\u7c7b\u578b\u5b9a\u4e49\u6210\u5458\u5b9a\u4e49\uff09\u548c\u4e24\u4e2a\u7d22\u5f15\uff08maps\uff09\uff1a\u4e00\u4e2a\u7528\u4e8e\u6267\u884c\u5177\u540d\u5206\u914d\uff0c\u53e6\u4e00\u4e2a\u7528\u4e8e\u6267\u884c\u201c\u552f\u4e00\u5b9e\u4f8b\u201d\u5206\u914d\u3002<\/p>\n<ul type=\"disc\">\n<li>\u7b2c\u4e00\u4e2a\u7d22\u5f15\u662f\u4e00\u4e2amap\uff0c\u5b83\u4ee5\u4e00\u4e2a\u6307\u5411c-string\uff08\u5177\u540d\u5bf9\u8c61\u7684\u540d\u5b57\uff09\u7684\u6307\u9488\u505a\u4e3a\u952e\uff0c\u548c\u4e00\u4e2a\u52a8\u6001\u5206\u914d\u5bf9\u8c61\u4fe1\u606f\u7684\u7ed3\u6784\uff08\u6700\u91cd\u8981\u7684\u662f\u5bf9\u8c61\u7684\u5730\u5740\u548c\u5927\u5c0f\uff09\u3002<\/li>\n<li>\u7b2c\u4e8c\u4e2a\u7d22\u5f15\u7528\u4e8e\u5b9e\u73b0\u201c\u552f\u4e00\u5b9e\u4f8b\u201d\uff0c\u57fa\u672c\u4e0a\u4e0e\u7b2c\u4e00\u4e2a\u7d22\u5f15\u76f8\u540c\uff0c\u4f46\u662f\u5bf9\u8c61\u7684\u540d\u79f0\u6765\u6e90\u4e8etypeid(T).name()\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<p align=\"left\">\u7528\u4e8e\u5728\u7d22\u5f15\u4e2d\u5b58\u50a8\u952e\u503c\u5bf9\uff08pair\uff09\u7684\u5185\u5b58\u4e5f\u662f\u901a\u8fc7memory algorithm\u5206\u914d\u7684\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u544a\u8bc9\u5927\u5bb6\uff0c\u5185\u90e8\u7d22\u5f15\u4e0e\u6784\u5efa\u5728\u5185\u5b58\u7247\u6bb5\u4e0a\u7684\u666e\u901a\u7528\u6237\u5bf9\u8c61\u662f\u76f8\u4f3c\u7684\u3002\u5176\u4f59\u7528\u4e8e\u5b58\u50a8\u5bf9\u8c61\u540d\u79f0\u3001\u5bf9\u8c61\u81ea\u8eab\u548c\u6784\u9020\/\u6790\u6784\u5143\u6570\u636e\u7684\u5185\u5b58\u5219\u5728\u4e00\u4e2a\u5355\u72ec\u7684allocate()\u8c03\u7528\u4e2d\u91c7\u7528memory algorithm\u5206\u914d\u3002<\/p>\n<p align=\"left\">\u5982\u4e0a\u793a\uff0csegment manager\u5b8c\u5168\u4e0d\u4e86\u89e3\u5171\u4eab\u5185\u5b58\/\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u3002segment manager\u672c\u8eab\u4e0d\u5206\u914d\u5185\u5b58\u7247\u6bb5\u90e8\u5206\uff0c\u5b83\u53ea\u662f\u8c03\u7528memory algorithm\u4ece\u5269\u4f59\u7684\u5185\u5b58\u7247\u6bb5\u4e2d\u5206\u914d\u6240\u9700\u7684\u5185\u5b58\u3002segment manager\u662f\u4e00\u4e2a\u6784\u5efa\u5728memory algorithm\u4e4b\u4e0a\u7684\u7c7b\uff0c\u5b83\u63d0\u4f9b\u5177\u540d\u5bf9\u8c61\u6784\u5efa\u3001\u552f\u4e00\u5b9e\u4f8b\u6784\u5efa\u4ee5\u53ca\u5f88\u591a\u5176\u4ed6\u670d\u52a1\u3002<\/p>\n<p>segment manager\u5728Boost.Interprocess\u4e2d\u662f\u7531segment_manager\u7c7b\u5b9e\u73b0\u7684\u3002<\/p>\n<div>\n<pre><\/pre>\n<div class=\"dp-highlighter bg_cpp\">\n<div class=\"bar\">\n<div class=\"tools\"><strong>[cpp]<\/strong>\u00a0<a class=\"ViewSource\" title=\"view plain\" href=\"http:\/\/blog.csdn.net\/great3779\/article\/details\/7310120#\" target=\"_blank\" rel=\"noopener\">view plain<\/a>\u00a0<a class=\"CopyToClipboard\" title=\"copy\" href=\"http:\/\/blog.csdn.net\/great3779\/article\/details\/7310120#\" target=\"_blank\" rel=\"noopener\">copy<\/a><\/p>\n<div><embed id=\"ZeroClipboardMovie_2\" src=\"https:\/\/csdnimg.cn\/public\/highlighter\/ZeroClipboard.swf\" type=\"application\/x-shockwave-flash\" width=\"16\" height=\"16\" align=\"middle\" name=\"ZeroClipboardMovie_2\" data-mce-fragment=\"1\"><\/embed><\/div>\n<div><embed id=\"ZeroClipboardMovie_4\" src=\"https:\/\/csdnimg.cn\/public\/highlighter\/ZeroClipboard.swf\" type=\"application\/x-shockwave-flash\" width=\"16\" height=\"16\" align=\"middle\" name=\"ZeroClipboardMovie_4\" data-mce-fragment=\"1\"><\/embed><\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<ol class=\"dp-cpp\" start=\"1\">\n<li class=\"alt\"><span class=\"keyword\">template<\/span>&lt;<span class=\"keyword\">class<\/span>\u00a0CharType<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0,<span class=\"keyword\">class<\/span>\u00a0MemoryAlgorithm<\/li>\n<li class=\"alt\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0,<span class=\"keyword\">template<\/span>&lt;<span class=\"keyword\">class<\/span>\u00a0IndexConfig&gt;\u00a0<span class=\"keyword\">class<\/span>\u00a0IndexType&gt;<\/li>\n<li><span class=\"keyword\">class<\/span>\u00a0segment_manager;<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p align=\"left\">\u5982\u4e0a\u793a\uff0csegment manager\u975e\u5e38\u901a\u7528\uff1a\u6211\u4eec\u80fd\u6307\u5b9a\u7528\u4e8e\u533a\u5206\u5177\u540d\u5bf9\u8c61\u7684\u5b57\u7b26\u7c7b\u578b\uff0c\u6211\u4eec\u80fd\u6307\u5b9a\u52a8\u6001\u63a7\u5236\u5185\u5b58\u7247\u6bb5\u90e8\u5206\u7684memory algorithm\u00a0\uff0c\u5e76\u4e14\u6211\u4eec\u4e5f\u80fd\u6307\u5b9a\u5b58\u50a8\u6620\u5c04\uff08\u540d\u6307\u9488\uff0c\u5bf9\u8c61\u4fe1\u606f\uff09\u7684\u7d22\u5f15\u7c7b\u578b\u3002\u6211\u4eec\u80fd\u6784\u5efa\u6211\u4eec\u81ea\u5df1\u7684\u7d22\u5f15\u7c7b\u578b\uff0c\u5c31\u597d\u50cf<a title=\"Building custom indexes\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/interprocess\/customizing_interprocess.html#interprocess.customizing_interprocess.custom_indexes\" target=\"_blank\" rel=\"noopener\">Buildingcustom indexes<\/a>\u00a0\u7ae0\u8282\u4e2d\u89e3\u91ca\u5730\u4e00\u6837\u3002<\/p>\n<h3><a name=\"t5\"><\/a><a target=\"_blank\" name=\"t5\"><\/a><a target=\"_blank\">Boost.Interprocess<\/a>\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\uff08managed memory segments\uff09<\/h3>\n<p>\u6784\u5efa\u5171\u4eab\u5185\u5b58\/\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u7684Boost.Interprocessmanaged memory segments\u653e\u7f6esegment manager\u5e76\u4e14\u53d1\u9001\u7528\u6237\u7684\u8bf7\u6c42\u81f3segment manager\u3002\u4f8b\u5982\uff0c<a title=\"Class template basic_managed_shared_memory\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/boost\/interprocess\/basic_managed_shared_me_id986100.html\" target=\"_blank\" rel=\"noopener\">basic_managed_shared_memory<\/a>\u00a0\u662f\u4e00\u4e2aBoost.Interprocess\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\uff0c\u5b83\u4e0e\u5171\u4eab\u5185\u5b58\u4e00\u8d77\u5de5\u4f5c\u3002<a title=\"Class template basic_managed_mapped_file\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/boost\/interprocess\/basic_managed_mapped_file.html\" target=\"_blank\" rel=\"noopener\">basic_managed_mapped_file<\/a>\u4e0e\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u4e00\u8d77\u5de5\u4f5c&#8230;&#8230;\u3002<\/p>\n<p>\u57fa\u672c\u4e0a\uff0cBoost.Interprocess managed memory segment\u7684\u63a5\u53e3\u4e0esegment manager\u76f8\u540c\uff0c\u4f46\u5b83\u4e5f\u63d0\u4f9b\u4e86\u51fd\u6570\u6765\u201c\u6253\u5f00\u201d\u3001\u201c\u521b\u5efa\u201d\u6216\u201c\u6253\u5f00\u6216\u521b\u5efa\u201d\u5171\u4eab\u5185\u5b58\/\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u7247\u6bb5\u5e76\u4e14\u521d\u59cb\u5316\u6240\u6709\u9700\u8981\u7684\u8d44\u6e90\u3002\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\u7c7b\u4e0d\u662f\u6784\u5efa\u5728\u5171\u4eab\u5185\u5b58\u6216\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u4e2d\uff0c\u5b83\u4eec\u662f\u901a\u5e38\u7684C++\u7c7b\uff0c\u5b58\u50a8\u4e86\u4e00\u4e2asegment manager\uff08\u6784\u5efa\u5728\u4eab\u5185\u5b58\u6216\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u4e0a\uff09\u7684\u6307\u9488\u3002<\/p>\n<p>\u6b64\u5916\uff0cmanaged memory segments\u63d0\u4f9b\u4e86\u7279\u5b9a\u7684\u51fd\u6570\uff1amanaged_mapped_file\u63d0\u4f9b\u51fd\u6570\u7528\u4e8e\u5237\u65b0\u5185\u5b58\u5185\u5bb9\u81f3\u6587\u4ef6\uff0cmanaged_heap_memory\u63d0\u4f9b\u51fd\u6570\u7528\u4e8e\u6269\u5c55\u5185\u5b58\uff0c\u2026\u2026<\/p>\n<p>\u5927\u90e8\u5206Boost.Interprocess managed memory segments\u7684\u51fd\u6570\u80fd\u591f\u5728\u6240\u6709\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\u95f4\u5171\u4eab\uff0c\u56e0\u4e3a\u5f88\u591a\u65f6\u5019\u5b83\u4eec\u4ec5\u53d1\u9001\u51fd\u6570\u81f3segment manager\u3002\u57fa\u4e8e\u6b64\uff0c\u5728Boost.Interprocess\u4e2d\uff0c\u6240\u6709\u7684\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\u90fd\u6d3e\u751f\u4e8e\u4e00\u4e2a\u5171\u540c\u7684\u7c7b\uff0c\u6b64\u7c7b\u5b9e\u73b0\u4e86\u5185\u5b58\u72ec\u7acb\uff08memory-independent\uff09\u51fd\u6570\uff08\u5171\u4eab\u5185\u5b58\u3001\u5185\u5b58\u6620\u5c04\u6587\u4ef6\uff09\uff1a<a href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/boost\/interprocess\/detail\/managed_memory_impl.hpp\" target=\"_blank\" rel=\"noopener\">boost::interprocess::ipcdetail::basic_managed_memory_impl<\/a>\u3002<\/p>\n<p>\u6d3e\u751f\u4e8e\u6b64\u7c7b\uff0c\u5bf9\u4e0d\u540c\u7684\u5185\u5b58\u540e\u7aef\uff0cBoost.Interprocess\u5b9e\u73b0\u4e86\u6570\u4e2a\u6258\u7ba1\u5185\u5b58\u7c7b\uff1a<\/p>\n<ul type=\"disc\">\n<li><a title=\"Class template basic_managed_shared_memory\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/boost\/interprocess\/basic_managed_shared_me_id986100.html\" target=\"_blank\" rel=\"noopener\">basic_managed_shared_memory<\/a>\u00a0(for shared memory).<\/li>\n<li><a title=\"Class template basic_managed_mapped_file\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/boost\/interprocess\/basic_managed_mapped_file.html\" target=\"_blank\" rel=\"noopener\">basic_managed_mapped_file<\/a>\u00a0(for memory mapped files).<\/li>\n<li><a title=\"Class template basic_managed_heap_memory\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/boost\/interprocess\/basic_managed_heap_memory.html\" target=\"_blank\" rel=\"noopener\">basic_managed_heap_memory<\/a>\u00a0(for heap allocated memory).<\/li>\n<li><a title=\"Class template basic_managed_external_buffer\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/boost\/interprocess\/basic_managed_external__id985448.html\" target=\"_blank\" rel=\"noopener\">basic_managed_external_buffer<\/a>\u00a0(for user provided external buffer).<\/li>\n<\/ul>\n<h2><a name=\"t6\"><\/a><a target=\"_blank\" name=\"t6\"><\/a><a target=\"_blank\">\u5206\u914d\u5668\u548c\u5bb9\u5668<\/a><\/h2>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\">Boost.Interprocess\u5206\u914d\u5668<\/p>\n<p>Boost.Interprocess \u72ec\u7acb\u5b58\u50a8\u6c60\u7684\u5b9e\u73b0<\/p>\n<p>Boost.Interprocess\u81ea\u9002\u5e94\u6c60\u7684\u5b9e\u73b0<\/p>\n<p>Boost.Interprocess\u5bb9\u5668<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><a name=\"t7\"><\/a><a target=\"_blank\" name=\"t7\"><\/a><a target=\"_blank\">Boost.Interprocess<\/a>\u5206\u914d\u5668<\/h3>\n<p>Boost.Interprocess\u7684\u7c7bSTL\uff08STL-like\uff09\u5206\u914d\u5668\u662f\u76f8\u5f53\u7b80\u5355\u7684\uff0c\u4e14\u9075\u4ece\u901a\u5e38\u7684C++\u5206\u914d\u5668\u65b9\u6cd5\u3002\u901a\u5e38\uff0cSTL\u5bb9\u5668\u7684\u5206\u914d\u5668\u57fa\u4e8enew\/delete\u64cd\u4f5c\u4e4b\u4e0a\uff0c\u5728\u6b64\u4e4b\u4e0a\u5b83\u4eec\u5b9e\u73b0\u4e86\u6c60\uff08pools\uff09\u3001\u7ade\u6280\u573a\uff08arenas\uff09\u548c\u5176\u4ed6\u5206\u914d\u6280\u5de7\u3002<\/p>\n<p>\u5728Boost.Interprocess\u5206\u914d\u5668\u4e2d\uff0c\u65b9\u6cd5\u662f\u76f8\u4f3c\u7684\uff0c\u4f46\u662f\u6240\u6709\u5206\u914d\u5668\u90fd\u662f\u57fa\u4e8esegment manager\u3002segment manager\u662f\u552f\u4e00\u4e00\u4e2a\u63d0\u4f9b\u4ece\u7b80\u5355\u5185\u5b58\u5206\u914d\u5230\u5177\u540d\u5bf9\u8c61\u521b\u5efa\u7684\u3002Boost.Interprocess\u5206\u914d\u5668\u603b\u662f\u5b58\u50a8\u4e00\u4e2asegment manager\u6307\u9488\uff0c\u4ee5\u4fbf\u5b83\u4eec\u80fd\u4ece\u5185\u5b58\u7247\u6bb5\u83b7\u53d6\u5185\u5b58\u6216\u5728\u5206\u914d\u5668\u95f4\u5171\u4eab\u666e\u901a\u6c60\u3002<\/p>\n<p>\u6b63\u5982\u4f60\u80fd\u60f3\u5230\u7684\uff0c\u5206\u914d\u5668\u7684\u6210\u5458\u6307\u9488\u4e0d\u662f\u539f\u59cb\u6307\u9488\uff0c\u800c\u662f\u7531segment_manager::void_pointer\u5b9a\u4e49\u7684\u6307\u9488\u7c7b\u578b\u3002\u6b64\u5916\uff0cBoost.Interprocess\u5206\u914d\u5668\u7684\u6307\u9488\u7c7b\u578b\u5b9a\u4e49\u4e5f\u4e0esegment_manager::void_pointer\u5177\u6709\u76f8\u540c\u7684\u7c7b\u578b\u3002<\/p>\n<p>\u8fd9\u610f\u5473\u7740\u5982\u679c\u6211\u4eec\u7684\u5206\u914d\u5668\u7b97\u6cd5\u5b9a\u4e49\u00a0void_pointer\u4e3aoffset_ptr&lt;void&gt;\uff0c boost::interprocess::allocator&lt;T&gt;\u5c06\u5b58\u50a8\u4e00\u4e2aoffset_ptr&lt;segment_manager&gt;\u00a0\u6307\u5411segment manager\uff0c\u4e14boost::interprocess::allocator&lt;T&gt;::pointer\u7c7b\u578b\u5c06\u662foffset_ptr&lt;T&gt;\u3002\u8fd9\u6837\uff0cBoost.Interprocess\u5206\u914d\u5668\u80fd\u88ab\u7f6e\u4e8esegment manager\u6258\u7ba1\u7684\u5185\u5b58\u7247\u6bb5\u4e2d\uff0c\u5373\u5171\u4eab\u5185\u5b58\u3001\u5185\u5b58\u6620\u5c04\u6587\u4ef6\u7b49\u3002<\/p>\n<h3><a name=\"t8\"><\/a><a target=\"_blank\" name=\"t8\"><\/a><a target=\"_blank\">Boost.Interprocess<\/a>\u72ec\u7acb\u5b58\u50a8\u6c60\u7684\u5b9e\u73b0<\/h3>\n<p>\u72ec\u7acb\u5b58\u50a8\u6c60\u662f\u7b80\u5355\u7684\uff0c\u5b83\u9075\u4ece\u7ecf\u5178\u72ec\u7acb\u5b58\u50a8\u7b97\u6cd5\u3002<\/p>\n<ul type=\"disc\">\n<li>\u5185\u5b58\u6c60\u4f7f\u7528segment manager\u7684\u539f\u59cb\u5185\u5b58\u5206\u914d\u51fd\u6570\u6765\u5206\u914d\u5185\u5b58\u5757\u3002<\/li>\n<li>\u5185\u5b58\u5757\u5305\u542b\u4e86\u4e00\u4e2a\u6307\u9488\u7528\u4e8e\u7ec4\u7ec7\u4e00\u4e2a\u5355\u94fe\u8868\u5185\u5b58\u5757\u3002\u5185\u5b58\u6c60\u5c06\u5305\u542b\u6307\u5411\u7b2c\u4e00\u4e2a\u5185\u5b58\u5757\u7684\u6307\u9488\u3002<\/li>\n<li>\u5185\u5b58\u5757\u7684\u5176\u4f59\u90e8\u5206\u88ab\u5206\u5272\u4e3a\u8bf7\u6c42\u5927\u5c0f\u7684\u8282\u70b9\uff0c\u5e76\u4e14\u6ca1\u6709\u5185\u5b58\u88ab\u7528\u4f5c\u6bcf\u4e2a\u8282\u70b9\u7684\u8d1f\u8f7d\u3002\u7531\u4e8e\u7a7a\u95f2\u8282\u70b9\u7684\u5185\u5b58\u672a\u88ab\u4f7f\u7528\uff0c\u56e0\u6b64\u6b64\u5185\u5b58\u88ab\u7528\u6765\u653e\u7f6e\u4e00\u4e2a\u6307\u9488\u7528\u4e8e\u7ec4\u7ec7\u4e00\u4e2a\u7a7a\u95f2\u8282\u70b9\u7684\u5355\u94fe\u8868\u3002\u5185\u5b58\u6c60\u5177\u6709\u4e00\u4e2a\u6307\u5411\u7b2c\u4e00\u4e2a\u7a7a\u95f2\u8282\u70b9\u7684\u6307\u9488\u3002<\/li>\n<li>\u5206\u914d\u4e00\u4e2a\u8282\u70b9\u4ec5\u4ec5\u662f\u4ece\u94fe\u8868\u4e2d\u83b7\u53d6\u7b2c\u4e00\u4e2a\u7a7a\u95f2\u8282\u70b9\u3002\u5982\u679c\u94fe\u8868\u4e3a\u7a7a\uff0c\u5219\u5206\u914d\u4e00\u4e2a\u65b0\u7684\u5185\u5b58\u5757\uff0c\u94fe\u63a5\u5728\u5185\u5b58\u5757\u94fe\u8868\u4e2d\uff0c\u7136\u540e\u65b0\u7684\u7a7a\u95f2\u5185\u5b58\u88ab\u94fe\u63a5\u81f3\u7a7a\u95f2\u8282\u70b9\u94fe\u8868\u4e2d\u3002<\/li>\n<li>\u6790\u6784\u5c31\u662f\u8fd4\u56de\u8282\u70b9\u81f3\u7a7a\u95f2\u8282\u70b9\u94fe\u8868\u4e2d\u3002<\/li>\n<li>\u5f53\u5185\u5b58\u6c60\u9500\u6bc1\u540e\uff0c\u5185\u5b58\u5757\u94fe\u8868\u88ab\u904d\u5386\u5e76\u4e14\u5185\u5b58\u8fd4\u8fd8\u81f3segment manager\u3002<\/li>\n<\/ul>\n<p align=\"left\">\u5185\u5b58\u6c60\u7531<a href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/boost\/interprocess\/allocators\/detail\/node_pool.hpp\" target=\"_blank\" rel=\"noopener\">private_node_pool and shared_node_pool<\/a>\u7c7b\u5b9e\u73b0\u3002<\/p>\n<h3><a name=\"t9\"><\/a><a target=\"_blank\" name=\"t9\"><\/a><a target=\"_blank\">Boost.Interprocess<\/a>\u81ea\u9002\u5e94\u6c60\u7684\u5b9e\u73b0<\/h3>\n<p align=\"left\">\u81ea\u9002\u5e94\u6c60\u662f\u72ec\u7acb\u94fe\u8868\u7684\u4e00\u4e2a\u53d8\u79cd\uff0c\u4f46\u5b83\u4eec\u5177\u6709\u66f4\u590d\u6742\u7684\u65b9\u6cd5\uff1a<\/p>\n<ul type=\"disc\">\n<li>\u5185\u5b58\u6c60\u4f7f\u7528segment manager\u5206\u914d\u5bf9\u5176\u7684\u5185\u5b58\u5757\uff0c\u800c\u4e0d\u662f\u4f7f\u7528\u539f\u59cb\u5206\u914d\u5668\u3002\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u7279\u6027\uff0c\u56e0\u4e3a\u8282\u70b9\u80fd\u591f\u901a\u8fc7\u5e94\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u4f2a\u88c5\uff08mask\uff09\u81f3\u5176\u5730\u5740\u4e0a\u6765\u83b7\u53d6\u5b83\u7684\u5185\u5b58\u5757\u4fe1\u606f\u3002<\/li>\n<li>\u5185\u5b58\u5757\u5305\u542b\u4e86\u6307\u9488\u4ee5\u7528\u4e8e\u5f62\u6210\u4e00\u4e2a\u5185\u5b58\u5757\u7684\u53cc\u5411\u94fe\u8868\uff0c\u540c\u65f6\u4e5f\u5305\u542b\u4e86\u4e00\u4e2a\u989d\u5916\u7684\u6307\u9488\u7528\u4e8e\u521b\u5efa\u4e00\u4e2a\u5185\u5b58\u5757\u4e2d\u7a7a\u95f2\u8282\u70b9\u7684\u5355\u5411\u94fe\u8868\u3002\u56e0\u6b64\u4e0e\u72ec\u7acb\u5b58\u50a8\u7b97\u6cd5\u4e0d\u540c\uff0c\u7a7a\u95f2\u8282\u70b9\u94fe\u8868\u4f5c\u7528\u4e8e\u6bcf\u4e2a\u5757\u4e0a\u3002<\/li>\n<li>\u5185\u5b58\u6c60\u4ee5\u7a7a\u95f2\u8282\u70b9\u589e\u5e8f\u7684\u65b9\u5f0f\u7ef4\u62a4\u5185\u5b58\u5757\u3002\u8fd9\u80fd\u63d0\u9ad8\u5c40\u90e8\u6027\uff0c\u540c\u65f6\u51cf\u5c11\u8de8\u5185\u5b58\u5757\u8282\u70b9\u5206\u914d\u65f6\u7684\u79bb\u6563\u6027\uff0c\u4fc3\u8fdb\u4e86\u5b8c\u5168\u7a7a\u95f2\u5185\u5b58\u5757\u7684\u5efa\u7acb\u3002<\/li>\n<li>\u5185\u5b58\u6c60\u5177\u6709\u4e00\u4e2a\u6307\u5411\u6700\u5c0f\uff08\u4f46\u4e0d\u662f\u96f6\uff09\u7a7a\u95f2\u8282\u70b9\u5185\u5b58\u5757\u7684\u6307\u9488\u3002\u6b64\u5185\u5b58\u5757\u88ab\u79f0\u4e3a\u201c\u6fc0\u6d3b\u7684\u201d\u5185\u5b58\u5757\u3002<\/li>\n<li>\u5206\u914d\u4e00\u4e2a\u8282\u70b9\u4ec5\u4ec5\u662f\u8fd4\u56de\u201c\u6fc0\u6d3b\u7684\u201d\u5185\u5b58\u5757\u7684\u7b2c\u4e00\u4e2a\u7a7a\u95f2\u8282\u70b9\u3002\u5185\u5b58\u5757\u94fe\u8868\u6309\u7167\u7a7a\u95f2\u8282\u70b9\u603b\u6570\u91cd\u6392\u5e8f\u3002\u5982\u679c\u9700\u8981\u7684\u8bdd\uff0c\u201c\u6fc0\u6d3b\u7684\u201d\u5185\u5b58\u6c60\u6307\u9488\u4e5f\u88ab\u66f4\u65b0\u3002<\/li>\n<li>\u5982\u679c\u5185\u5b58\u6c60\u8017\u5c3d\u4e86\u8282\u70b9\uff0c\u5219\u4e00\u4e2a\u65b0\u7684\u5185\u5b58\u6c60\u88ab\u5206\u914d\uff0c\u7136\u540e\u63a8\u5165\u5185\u5b58\u5757\u94fe\u8868\u7684\u5c3e\u90e8\u3002\u5982\u679c\u9700\u8981\u7684\u8bdd\uff0c\u201c\u6fc0\u6d3b\u7684\u201d\u5185\u5b58\u6c60\u6307\u9488\u4e5f\u88ab\u66f4\u65b0\u3002<\/li>\n<li>\u6790\u6784\u5c31\u662f\u8fd4\u56de\u8282\u70b9\u81f3\u7a7a\u95f2\u8282\u70b9\u94fe\u8868\u4e2d\uff0c\u7136\u540e\u76f8\u5e94\u7684\u66f4\u65b0\u201c\u6fc0\u6d3b\u7684\u201d\u5185\u5b58\u6c60\u3002<\/li>\n<li>\u5982\u679c\u5b8c\u5168\u7a7a\u95f2\u5757\u7684\u6570\u76ee\u8d85\u8fc7\u9650\u5ea6\uff0c\u5185\u5b58\u5757\u88ab\u8fd4\u8fd8\u81f3segment manager\u3002<\/li>\n<li>\u5f53\u5185\u5b58\u6c60\u88ab\u9500\u6bc1\uff0c\u5185\u5b58\u5757\u94fe\u8868\u88ab\u904d\u5386\u5e76\u4e14\u5185\u5b58\u8fd4\u8fd8\u81f3segment manager\u3002<\/li>\n<\/ul>\n<p align=\"left\">\u81ea\u9002\u5e94\u6c60\u7531\u00a0<a href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/boost\/interprocess\/allocators\/detail\/adaptive_node_pool.hpp\" target=\"_blank\" rel=\"noopener\">private_adaptive_node_pool and adaptive_node_pool<\/a>\u7c7b\u5b9e\u73b0\u3002<\/p>\n<h3><a name=\"t10\"><\/a><a target=\"_blank\" name=\"t10\"><\/a><a target=\"_blank\">Boost.Interprocess<\/a>\u5bb9\u5668<\/h3>\n<p align=\"left\">Boost.Interprocess\u5bb9\u5668\u662fboost::interprocess\u540d\u7a7a\u95f4\u4e2d\u6807\u51c6STL\u5bb9\u5668\u7684\u5bf9\u5e94\uff0c\u4f46\u5177\u6709\u4e0b\u9762\u4e00\u4e9b\u7ec6\u8282\uff1a<\/p>\n<ul type=\"disc\">\n<li>Boost.Interprocess\u5bb9\u5668\u4e0d\u5047\u8bbe\u88ab\u4e00\u4e2a\u5206\u914d\u5668\u5206\u914d\u7684\u5185\u5b58\u80fd\u88ab\u5176\u4ed6\u540c\u7c7b\u578b\u7684\u5206\u914d\u5668\u91ca\u653e\u3002\u5b83\u4eec\u603b\u662f\u7528operator==()\u00a0\u6765\u6bd4\u8f83\u5206\u914d\u5668\u4ee5\u4fbf\u4e86\u89e3\u662f\u5426\u53ef\u884c\u3002<\/li>\n<li>Boost.Interprocess\u5bb9\u5668\u7684\u5185\u90e8\u7ed3\u6784\u6307\u9488\u5177\u6709\u4e0e\u5bb9\u5668\u5206\u914d\u5668\u5b9a\u4e49\u7684\u6307\u9488\u7c7b\u578b\u76f8\u540c\u7684\u7c7b\u578b\u3002\u8fd9\u5141\u8bb8\u653e\u7f6e\u5bb9\u5668\u81f3\u6620\u5c04\u5728\u4e0d\u540c\u57fa\u5730\u5740\u4e0a\u7684\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\u4e2d\u3002<\/li>\n<\/ul>\n<h2><a name=\"t11\"><\/a><a target=\"_blank\" name=\"t11\"><\/a><a target=\"_blank\">Boost.Interprocess<\/a>\u7684\u6027\u80fd<\/h2>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\">\u539f\u59cb\u5185\u5b58\u5206\u914d\u5668\u7684\u6027\u80fd<\/p>\n<p>\u5177\u540d\u5206\u914d\u5668\u7684\u6027\u80fd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6b64\u5c0f\u8282\u5c1d\u8bd5\u89e3\u91caBoost.Interprocess\u7684\u6027\u80fd\u7279\u6027\uff0c\u4ee5\u4fbf\u5982\u679c\u4f60\u9700\u8981\u66f4\u597d\u6027\u80fd\u65f6\u80fd\u4f18\u5316Boost.Interprocess\u7684\u4f7f\u7528\u3002<\/p>\n<h3><a name=\"t12\"><\/a><a target=\"_blank\" name=\"t12\"><\/a><a target=\"_blank\">\u539f\u59cb\u5185\u5b58\u5206\u914d\u5668\u7684\u6027\u80fd<\/a><\/h3>\n<p>\u4f7f\u7528Boost.Interprocess\uff0c\u4f60\u80fd\u6709\u4e24\u79cd\u7c7b\u578b\u7684\u539f\u59cb\u5185\u5b58\u5206\u914d\u5668\uff1a<\/p>\n<ul type=\"disc\">\n<li>\u663e\u5f0f\u7684\uff1a\u7528\u6237\u8c03\u7528\u00a0managed_shared_memory\/managed_mapped_file\u7b49\u7684allocate()\u548cdeallocate()\u51fd\u6570\u6765\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\u3002\u8fd9\u4e9b\u8c03\u7528\u88ab\u7ffb\u8bd1\u4e3aMemoryAlgorithm::allocate()\u51fd\u6570\uff0c\u8fd9\u610f\u5473\u7740\u4f60\u4ec5\u9700\u8981\u5173\u8054\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\u7684\u5185\u5b58\u7b97\u6cd5\u9700\u8981\u5206\u914d\u6570\u636e\u7684\u65f6\u95f4\u3002<\/li>\n<li>\u9690\u5f0f\u7684\uff1a\u4f8b\u5982\uff0c\u4f60\u5728\u4e0eBoost.Interprocess\u7684\u5bb9\u5668\u4e00\u8d77\u4f7f\u7528boost::interprocess::allocator&lt;&#8230;&gt;\u00a0\u3002\u6bcf\u4e00\u6b21vector\/string\u5fc5\u987b\u91cd\u5206\u914d\u5b83\u7684\u7f13\u51b2\u533a\u6216\u6bcf\u4e00\u6b21\u4f60\u63d2\u5165\u4e00\u4e2a\u5bf9\u8c61\u81f3\u8282\u70b9\u5bb9\u5668\u65f6\uff0c\u6b64\u5206\u914d\u5668\u8c03\u7528\u4e0e\u663e\u5f0f\u65b9\u6cd5\u76f8\u540c\u7684MemoryAlgorithm::allocate()\u51fd\u6570\uff0c\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u4f60\u8ba4\u4e3a\u8fd9\u79cd\u5185\u5b58\u5206\u914d\u662f\u4f60\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u4e2a\u74f6\u9888\uff0c\u4f60\u6709\u5982\u4e0b\u7684\u66ff\u4ee3\u65b9\u6848\uff1a<\/p>\n<ul type=\"disc\">\n<li>\u5982\u679c\u4f60\u4f7f\u7528map\/set\u5173\u8054\u5bb9\u5668\uff0c\u5c1d\u8bd5\u4f7f\u7528flat_map\u5bb6\u65cf\u6765\u66ff\u6362map\u5bb6\u65cf\uff0c\u5982\u679c\u4f60\u4e3b\u8981\u6267\u884c\u641c\u7d22\u5e76\u4e14\u63d2\u5165\/\u5220\u9664\u4e3b\u8981\u662f\u5728\u521d\u59cb\u5316\u65f6\u8fdb\u884c\u3002\u73b0\u5728\u5f00\u9500\u4e3b\u8981\u662f\u5f53\u6709\u5e8f\u5411\u91cf\u5fc5\u987b\u91cd\u5206\u914d\u5176\u5b58\u50a8\u548c\u79fb\u52a8\u6570\u636e\u65f6\u3002\u5f53\u4f60\u9884\u5148\u77e5\u9053\u4f60\u5c06\u63d2\u5165\u591a\u5c11\u6570\u636e\u65f6\uff0c\u4f60\u4e5f\u80fd\u8c03\u7528\u8fd9\u4e9b\u5bb9\u5668\u7684reserve()\u65b9\u6cd5\u3002\u7136\u800c\uff0c\u5728\u8fd9\u4e9b\u5bb9\u5668\u4e2d\uff0c\u5728\u63d2\u5165\u64cd\u4f5c\u65f6\u8fed\u4ee3\u5668\u4f1a\u5931\u6548\uff0c\u56e0\u6b64\u6b64\u66ff\u4ee3\u65b9\u6848\u4ec5\u5728\u67d0\u4e9b\u5e94\u7528\u4e2d\u6709\u6548\u3002<\/li>\n<li>\u5bf9\u8282\u70b9\u5bb9\u5668\u4f7f\u7528Boost.Interprocess\u6c60\u5206\u914d\u5668\uff0c\u56e0\u4e3a\u4ec5\u5f53\u6c60\u5b50\u4e2d\u8282\u70b9\u7528\u5149\u65f6\uff0c\u6c60\u5206\u914d\u5668\u8c03\u7528allocate()\u3002\u8fd9\u662f\u76f8\u5f53\u6709\u6548\u7684\uff08\u5927\u5927\u9ad8\u4e8e\u76ee\u524d\u7f3a\u7701\u7684\u901a\u7528\u7b97\u6cd5\uff09\uff0c\u5e76\u4e14\u80fd\u8282\u7701\u5f88\u591a\u5185\u5b58\u3002\u66f4\u591a\u8be6\u60c5\u53c2\u8003<a title=\"Segregated storage node allocators\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/interprocess\/allocators_containers.html#interprocess.allocators_containers.stl_allocators_segregated_storage\" target=\"_blank\" rel=\"noopener\">Segregated storage node allocators<\/a>\u00a0\u548c\u00a0<a title=\"Adaptive pool node allocators\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/interprocess\/allocators_containers.html#interprocess.allocators_containers.stl_allocators_adaptive\" target=\"_blank\" rel=\"noopener\">Adaptive node allocators<\/a><\/li>\n<li>\u5199\u4f60\u81ea\u5df1\u7684\u5185\u5b58\u5206\u914d\u7b97\u6cd5\u3002\u5982\u679c\u4f60\u6709\u5185\u5b58\u5206\u914d\u7b97\u6cd5\u7684\u7ecf\u9a8c\u5e76\u4e14\u4f60\u8ba4\u4e3a\u53e6\u4e00\u79cd\u7b97\u6cd5\u6bd4\u7f3a\u7701\u7684\u66f4\u9002\u5e94\u4f60\u7684\u7a0b\u5e8f\uff0c\u4f60\u80fd\u5728\u6240\u6709Boost.Interprocess\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\u4e2d\u6307\u5b9a\u5b83\u3002\u53c2\u8003\u7ae0\u8282\u00a0<a title=\"Writing a new shared memory allocation algorithm\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/interprocess\/customizing_interprocess.html#interprocess.customizing_interprocess.custom_interprocess_alloc\" target=\"_blank\" rel=\"noopener\">Writing a new shared memory allocation algorithm<\/a>\u6765\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u5b83\u3002\u5982\u679c\u4f60\u8ba4\u4e3a\u5bf9\u901a\u5e38\u7684\u7a0b\u5e8f\uff0c\u5b83\u6bd4\u7f3a\u7701\u7684\u66f4\u597d\uff0c\u8bf7\u628a\u5b83\u8d21\u732e\u7ed9Boost.Interprocess\uff0c\u505a\u4e3a\u7f3a\u7701\u5206\u914d\u7b97\u6cd5\u3002<\/li>\n<\/ul>\n<h3><a name=\"t13\"><\/a><a target=\"_blank\" name=\"t13\"><\/a><a target=\"_blank\">\u5177\u540d\u5206\u914d\u5668\u7684\u6027\u80fd<\/a><\/h3>\n<p>Boost.Interprocess\u5141\u8bb8\u4e0e\u4e24\u4e2a\u7ebf\u7a0b\u5199\u5165\u5230\u4e00\u4e2a\u5171\u540c\u7684\u7ed3\u6784\u76f8\u540c\u7684\u5e76\u884c\uff0c\u9664\u4e86\u5f53\u7528\u6237\u521b\u5efa\/\u641c\u7d22\u547d\u540d\/\u552f\u4e00\u5bf9\u8c61\u65f6\u3002\u521b\u5efa\u4e00\u4e2a\u5177\u540d\u5bf9\u8c61\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ul type=\"disc\">\n<li>\u9501\u5b9a\u4e00\u4e2a\u5faa\u73af\u4e92\u65a5\u91cf\uff08\u4ee5\u4fbf\u4f60\u80fd\u4f7f\u5bf9\u8c61\u6784\u9020\u51fd\u6570\u5185\u90e8\u7684\u5177\u540d\u5206\u914d\u5668\u88ab\u6784\u5efa\uff09\u3002<\/li>\n<li>\u5c1d\u8bd5\u63d2\u5165[\u5177\u540d\u6307\u9488\uff0c\u5bf9\u8c61\u4fe1\u606f]\u81f3\u5177\u540d\/\u5bf9\u8c61\u7d22\u5f15\u4e2d\u3002\u6b64\u67e5\u627e\u5fc5\u987b\u4fdd\u8bc1\u540d\u5b57\u5728\u4e4b\u524d\u6ca1\u88ab\u4f7f\u7528\u8fc7\u3002\u8fd9\u901a\u8fc7\u5728\u7d22\u5f15\u4e2d\u8c03\u7528insert()\u51fd\u6570\u5b9e\u73b0\u3002\u56e0\u6b64\u6b64\u64cd\u4f5c\u7684\u65f6\u95f4\u4f9d\u8d56\u4e8e\u7d22\u5f15\u7c7b\u578b\uff08\u6709\u5e8f\u5411\u91cf\u3001\u6811\u3001\u54c8\u5e0c\u7b49\uff09\u3002\u5982\u679c\u7d22\u5f15\u5fc5\u987b\u88ab\u91cd\u5206\u914d\u65f6\uff0c\u5b83\u9700\u8981\u8c03\u7528\u5185\u5b58\u7b97\u6cd5\u5206\u914d\u51fd\u6570\uff0c\u5b83\u662f\u4e00\u4e2a\u8282\u70b9\u5206\u914d\u5668\uff0c\u4f7f\u7528\u4e86\u6c60\u5206\u914d\u2026<\/li>\n<li>\u5206\u914d\u4e00\u4e2a\u7f13\u51b2\u533a\u6765\u653e\u7f6e\u5bf9\u8c61\u7684\u540d\u79f0\u3001\u5bf9\u8c61\u672c\u8eab\u548c\u6790\u6784\u5143\u6570\u636e\uff08\u5bf9\u8c61\u6570\u76ee\u7b49\u7b49\uff09\u3002<\/li>\n<li>\u8c03\u7528\u521b\u5efa\u5bf9\u8c61\u7684\u6784\u9020\u51fd\u6570\u3002\u5982\u679c\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u5219\u6bcf\u4e2a\u6570\u7ec4\u6210\u5458\u4e00\u4e2a\u6784\u9020\u51fd\u6570\u3002<\/li>\n<li>\u89e3\u9501\u5faa\u73af\u4e92\u65a5\u91cf\u3002<\/li>\n<\/ul>\n<p align=\"left\">\u5f53\u4f7f\u7528\u5bf9\u8c61\u540d\u9500\u6bc1\u4e00\u4e2a\u5177\u540d\u5bf9\u8c61\u65f6\uff08destroy&lt;T&gt;(name)\uff09\uff0c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ul type=\"disc\">\n<li>\u9501\u5b9a\u4e00\u4e2a\u5faa\u73af\u4e92\u65a5\u91cf<\/li>\n<li>\u5728\u7d22\u5f15\u4e2d\u641c\u7d22\u5173\u8054\u6b64\u540d\u79f0\u7684\u6761\u76ee\u3002\u62f7\u8d1d\u90a3\u4e9b\u4fe1\u606f\u5e76\u5220\u9664\u7d22\u5f15\u9879\u3002\u8fd9\u4e9b\u662f\u901a\u8fc7\u4f7f\u7528\u7d22\u5f15\u7684find(const\u00a0key_type\u00a0&amp;)\u548cerase(iterator)\u6210\u5458\u5b8c\u6210\u7684\u3002\u5982\u679c\u7d22\u5f15\u662f\u4e00\u4e2a\u5e73\u8861\u6811\u6216\u6709\u5e8f\u5411\u91cf\u7b49\u65f6\uff0c\u8fd9\u9700\u8981\u6210\u5458\u91cd\u6392\u5e8f\u3002<\/li>\n<li>\u8c03\u7528\u5bf9\u8c61\u7684\u6790\u6784\u51fd\u6570\uff08\u5982\u679c\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u9700\u8981\u8c03\u7528\u5f88\u591a\u6b21\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u5206\u914d\u7b97\u6cd5\u91ca\u653e\u5305\u542b\u4e86\u540d\u5b57\u3001\u5143\u6570\u636e\u548c\u5bf9\u8c61\u81ea\u8eab\u7684\u5185\u5b58\u7f13\u51b2\u533a\u3002<\/li>\n<li>\u89e3\u9501\u5faa\u73af\u4e92\u65a5\u91cf\u3002<\/li>\n<\/ul>\n<p align=\"left\">\u5f53\u4f7f\u7528\u5bf9\u8c61\u6307\u9488\u9500\u6bc1\u4e00\u4e2a\u5177\u540d\u5bf9\u8c61\u65f6\uff08destroy_ptr(T\u00a0*ptr)\uff09\uff0c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ul type=\"disc\">\n<li>\u9501\u5b9a\u4e00\u4e2a\u5faa\u73af\u4e92\u65a5\u91cf<\/li>\n<li>\u4f9d\u8d56\u4e8e\u7d22\u5f15\u7c7b\u578b\uff0c\u4ee5\u4e0b\u53ef\u80fd\u662f\u4e0d\u540c\u7684\uff1a\n<ul type=\"disc\">\n<li>\u5982\u679c\u7d22\u5f15\u662f\u8282\u70b9\u7d22\u5f15\uff08\u901a\u8fc7boost::interprocess::is_node_index\u6307\u5b9a\uff09\uff1a\u53d6\u5b58\u50a8\u5728\u5bf9\u8c61\u65c1\u7684\u8fed\u4ee3\u5668\uff0c\u7136\u540e\u8c03\u7528erase(iterator)\u3002\u5982\u679c\u7d22\u5f15\u662f\u4e00\u4e2a\u5e73\u8861\u6811\u6216\u6709\u5e8f\u5411\u91cf\u7b49\u65f6\uff0c\u8fd9\u9700\u8981\u6210\u5458\u91cd\u6392\u5e8f\u3002<\/li>\n<li>\u5982\u679c\u4e0d\u662f\u8282\u70b9\u7d22\u5f15\uff1a\u53d6\u5b58\u50a8\u5728\u5bf9\u8c61\u65c1\u7684\u540d\u79f0\u7136\u540e\u8c03\u7528erase(const key &amp;)\u5220\u9664\u7d22\u5f15\u9879\u3002\u5982\u679c\u7d22\u5f15\u662f\u4e00\u4e2a\u5e73\u8861\u6811\u6216\u6709\u5e8f\u5411\u91cf\u7b49\u65f6\uff0c\u8fd9\u9700\u8981\u6210\u5458\u91cd\u6392\u5e8f\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8c03\u7528\u5bf9\u8c61\u7684\u6790\u6784\u51fd\u6570\uff08\u5982\u679c\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u9700\u8981\u8c03\u7528\u5f88\u591a\u6b21\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u5206\u914d\u7b97\u6cd5\u91ca\u653e\u5305\u542b\u4e86\u540d\u5b57\u3001\u5143\u6570\u636e\u548c\u5bf9\u8c61\u81ea\u8eab\u7684\u5185\u5b58\u7f13\u51b2\u533a\u3002<\/li>\n<li>\u89e3\u9501\u5faa\u73af\u4e92\u65a5\u91cf\u3002<\/li>\n<\/ul>\n<p align=\"left\">\u5982\u679c\u4f60\u8ba4\u4e3a\u6027\u80fd\u8fd8\u4e0d\u591f\u597d\uff0c\u4f60\u8fd8\u6709\u5982\u4e0b\u66ff\u4ee3\u65b9\u6848\uff1a<\/p>\n<ul type=\"disc\">\n<li>\u53ef\u80fd\u662f\u9501\u5f97\u65f6\u95f4\u592a\u4e45\u800c\u5f71\u54cd\u4e86\u5e76\u53d1\u6027\u7684\u95ee\u9898\u3002\u5c1d\u8bd5\u51cf\u5c11\u5168\u5c40\u7d22\u5f15\u4e2d\u5177\u540d\u5bf9\u8c61\u7684\u6570\u76ee\uff0c\u5e76\u4e14\u5982\u679c\u4f60\u7684\u5e94\u7528\u670d\u52a1\u4e8e\u51e0\u4e2a\u5ba2\u6237\u7aef\uff0c\u5c1d\u8bd5\u4e3a\u6bcf\u4e2a\u5ba2\u6237\u7aef\u6784\u5efa\u4e00\u4e2a\u65b0\u7684\u6258\u7ba1\u5185\u5b58\u7247\u6bb5\uff0c\u800c\u4e0d\u662f\u5171\u7528\u4e00\u4e2a\u3002<\/li>\n<li>\u5982\u679c\u4f60\u89c9\u5f97\u7f3a\u7701\u7684\u4e0d\u591f\u5feb\uff0c\u4f7f\u7528\u5176\u4ed6Boost.Interprocess\u7d22\u5f15\u7c7b\u578b\u3002\u5982\u679c\u4f60\u8fd8\u4e0d\u6ee1\u8db3\uff0c\u5c31\u81ea\u5df1\u5199\u4e00\u4e2a\u7d22\u5f15\u7c7b\u578b\u3002\u53ef\u4ee5\u53c2\u8003<a title=\"Building custom indexes\" href=\"http:\/\/www.boost.org\/doc\/libs\/1_49_0_beta1\/doc\/html\/interprocess\/customizing_interprocess.html#interprocess.customizing_interprocess.custom_indexes\" target=\"_blank\" rel=\"noopener\">Building custom indexes<\/a>\u3002<\/li>\n<li>\u4f7f\u7528\u6307\u9488\u6790\u6784\u81f3\u5c11\u548c\u4f7f\u7528\u5bf9\u8c61\u540d\u5b57\u6790\u6784\u662f\u4e00\u6837\u5feb\u7684\uff0c\u5e76\u4e14\u53ef\u4ee5\u66f4\u5feb\u4e00\u4e9b\uff08\u4f8b\u5982\uff0c\u5728\u8282\u70b9\u5bb9\u5668\u4e2d\uff09\u3002\u56e0\u6b64\u5982\u679c\u95ee\u9898\u5728\u4e8e\u8fc7\u591a\u7684\u5177\u540d\u6790\u6784\u65f6\uff0c\u8bf7\u5c1d\u8bd5\u4f7f\u7528\u6307\u9488\u3002\u5982\u679c\u7d22\u5f15\u662f\u8282\u70b9\u7d22\u5f15\u65f6\uff0c\u4f60\u80fd\u8282\u7701\u4e00\u4e9b\u65f6\u95f4\u3002<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>Boost.Interprocess\u4f7f\u7528<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[118],"class_list":["post-1424","post","type-post","status-publish","format-standard","hentry","tag-02-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=1424"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1424\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=1424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=1424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=1424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}