{"id":41611,"date":"2025-06-03T23:27:44","date_gmt":"2025-06-03T15:27:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/41611.html"},"modified":"2025-06-03T23:27:44","modified_gmt":"2025-06-03T15:27:44","slug":"jvm%e5%ad%a6%e4%b9%a0%e5%85%ad-%e5%9e%83%e5%9c%be%e5%9b%9e%e6%94%b6","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/41611.html","title":{"rendered":"JVM\u5b66\u4e60(\u516d)--\u5783\u573e\u56de\u6536"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E4%B8%80%E3%80%81%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6-toc\" style=\"margin-left:0px\">\u4e00\u3001\u5783\u573e\u56de\u6536<\/p>\n<p id=\"1%E3%80%81%E6%A6%82%E8%BF%B0-toc\" style=\"margin-left:40px\">1\u3001\u6982\u8ff0<\/p>\n<p id=\"1.1%E3%80%81%E4%BB%80%E4%B9%88%E6%98%AF%E5%9E%83%E5%9C%BE%EF%BC%88Garbage)%EF%BC%89%EF%BC%9F-toc\" style=\"margin-left:80px\">1.1\u3001\u4ec0\u4e48\u662f\u5783\u573e&#xff08;Garbage)&#xff09;&#xff1f;<\/p>\n<p id=\"1.2%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E9%9C%80%E8%A6%81GC%3F-toc\" style=\"margin-left:80px\">1.2\u3001\u4e3a\u4ec0\u4e48\u9700\u8981GC?<\/p>\n<p id=\"1.3%E3%80%81Java%E4%B8%AD%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E7%9A%84%E9%87%8D%E7%82%B9%E5%8C%BA%E5%9F%9F%E6%98%AF%3F-toc\" style=\"margin-left:80px\">1.3\u3001Java\u4e2d\u5783\u573e\u56de\u6536\u7684\u91cd\u70b9\u533a\u57df\u662f?<\/p>\n<p id=\"1.4%E3%80%81%E6%97%A9%E6%9C%9F%E7%9A%84GC-toc\" style=\"margin-left:80px\">1.4\u3001\u65e9\u671f\u7684GC<\/p>\n<p id=\"2%E3%80%81%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:40px\">2\u3001\u5783\u573e\u56de\u6536\u7b97\u6cd5<\/p>\n<p id=\"2.1%E3%80%81%E5%9E%83%E5%9C%BE%E5%88%A4%E5%88%AB%E9%98%B6%E6%AE%B5%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:80px\">2.1\u3001\u5783\u573e\u5224\u522b\u9636\u6bb5\u7b97\u6cd5<\/p>\n<p id=\"1%E3%80%81%E5%BC%95%E7%94%A8%E8%AE%A1%E6%95%B0%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:120px\">1\u3001\u5f15\u7528\u8ba1\u6570\u7b97\u6cd5<\/p>\n<p id=\"2%E3%80%81%E5%8F%AF%E8%BE%BE%E6%80%A7%E5%88%86%E6%9E%90%E7%AE%97%E6%B3%95(%E6%88%96%E6%A0%B9%E6%90%9C%E7%B4%A2%E7%AE%97%E6%B3%95%E3%80%81%E8%BF%BD%E8%B8%AA%E6%80%A7%E5%9E%83%E5%9C%BE%E6%94%B6%E9%9B%86)-toc\" style=\"margin-left:120px\">2\u3001\u53ef\u8fbe\u6027\u5206\u6790\u7b97\u6cd5(\u6216\u6839\u641c\u7d22\u7b97\u6cd5\u3001\u8ffd\u8e2a\u6027\u5783\u573e\u6536\u96c6)<\/p>\n<p id=\"2.2%E3%80%81%E5%9E%83%E5%9C%BE%E6%B8%85%E9%99%A4%E9%98%B6%E6%AE%B5%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:80px\">2.2\u3001\u5783\u573e\u6e05\u9664\u9636\u6bb5\u7b97\u6cd5<\/p>\n<p id=\"1%E3%80%81%E6%A0%87%E8%AE%B0-%E6%B8%85%E9%99%A4%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:120px\">1\u3001\u6807\u8bb0-\u6e05\u9664\u7b97\u6cd5<\/p>\n<p id=\"2%E3%80%81%E5%A4%8D%E5%88%B6%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:120px\">2\u3001\u590d\u5236\u7b97\u6cd5<\/p>\n<p id=\"3%E3%80%81%E6%A0%87%E8%AE%B0-%E5%8E%8B%E7%BC%A9%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:120px\">3\u3001\u6807\u8bb0-\u538b\u7f29\u7b97\u6cd5<\/p>\n<p id=\"4%E3%80%81%E5%88%86%E4%BB%A3%E6%94%B6%E9%9B%86%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:120px\">4\u3001\u5206\u4ee3\u6536\u96c6\u7b97\u6cd5<\/p>\n<p id=\"5%E3%80%81%E5%A2%9E%E9%87%8F%E6%94%B6%E9%9B%86%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:120px\">5\u3001\u589e\u91cf\u6536\u96c6\u7b97\u6cd5<\/p>\n<p id=\"6%E3%80%81%E5%88%86%E5%8C%BA%E7%AE%97%E6%B3%95-toc\" style=\"margin-left:120px\">6\u3001\u5206\u533a\u7b97\u6cd5<\/p>\n<p id=\"3%E3%80%81%E7%9B%B8%E5%85%B3%E6%A6%82%E5%BF%B5-toc\" style=\"margin-left:40px\">3\u3001\u76f8\u5173\u6982\u5ff5<\/p>\n<p id=\"4%E3%80%81%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E5%99%A8-toc\" style=\"margin-left:40px\">4\u3001\u5783\u573e\u56de\u6536\u5668<\/p>\n<p id=\"5%E3%80%81%E5%88%86%E6%9E%90GC%E6%97%A5%E5%BF%97-toc\" style=\"margin-left:40px\">5\u3001\u5206\u6790GC\u65e5\u5fd7<\/p>\n<hr id=\"hr-toc\" \/>\n<h2 id=\"%E4%B8%80%E3%80%81%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6\">\u4e00\u3001\u5783\u573e\u56de\u6536<\/h2>\n<p>\u9762\u8bd5\u9898&#xff1a;<\/p>\n<p>1\u3001\u8bb2\u8bb2JVM\u7684GC&#xff1f;<\/p>\n<p>2\u3001\u5783\u573e\u56de\u6536\u673a\u5236<\/p>\n<p>3\u3001\u5783\u573e\u56de\u6536\u7684\u4f18\u70b9\u548c\u539f\u7406<\/p>\n<h3 id=\"1%E3%80%81%E6%A6%82%E8%BF%B0\">1\u3001\u6982\u8ff0<\/h3>\n<p>\u00a0 \u00a0 \u5783\u573e\u6536\u96c6&#xff0c;\u4e0d\u662fJava\u8bed\u8a00\u7684\u4f34\u751f\u4ea7\u7269\u3002\u65e9\u57281968\u5e74&#xff0c;\u7b2c\u4e00\u95e8\u5f00\u59cb\u4f7f\u7528\u5185\u5b58\u52a8\u6001\u5206\u914d\u548c\u5783\u573e\u6536\u96c6\u6280\u672f\u7684Lisp\u8bed\u8a00\u8bde\u751f\u3002<\/p>\n<p>\u5173\u4e8e\u5783\u573e\u6536\u96c6\u6709\u4e09\u4e2a\u7ecf\u5178\u95ee\u9898&#xff1a;<\/p>\n<p>\u00a0 \u00a0 \u00a01\u3001\u54ea\u4e9b\u5185\u5b58\u9700\u8981\u56de\u6536&#xff1f;<\/p>\n<p>\u00a0 \u00a0 2\u3001\u4ec0\u4e48\u65f6\u5019\u56de\u6536?<\/p>\n<p>\u00a0 \u00a0 3\u3001\u5982\u4f55\u56de\u6536?<\/p>\n<p>\u00a0 \u00a0 \u5783\u573e\u6536\u96c6\u673a\u5236\u662fJava\u7684\u62db\u724c\u80fd\u529b&#xff0c;<span style=\"color:#fe2c24\">\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387<\/span>\u3002\u5982\u4eca&#xff0c;\u5783\u573e\u6536\u96c6\u51e0\u4e4e\u6210\u4e3a\u73b0\u4ee3\u8bed\u8a00\u7684\u6807\u914d&#xff0c;\u5373\u4f7f\u7ecf\u8fc7\u5982\u6b64\u957f\u65f6\u95f4\u7684\u53d1\u5c55&#xff0c;Java\u7684\u5783\u573e\u6536\u96c6\u673a\u5236\u4ecd\u7136\u5728\u4e0d\u65ad\u7684\u6f14\u8fdb\u4e2d&#xff0c;\u4e0d\u540c\u5927\u5c0f\u7684\u8bbe\u5907\u3001\u4e0d\u540c\u7279\u5f81\u7684\u5e94\u7528\u573a\u666f&#xff0c;\u5bf9\u5783\u573e\u6536\u96c6\u63d0\u51fa\u4e86\u65b0\u7684\u6311\u6218&#xff0c;\u8fd9\u5f53\u7136\u4e5f\u662f<span style=\"color:#fe2c24\">\u9762\u8bd5\u7684\u70ed\u70b9<\/span>\u3002<\/p>\n<h4 id=\"1.1%E3%80%81%E4%BB%80%E4%B9%88%E6%98%AF%E5%9E%83%E5%9C%BE%EF%BC%88Garbage)%EF%BC%89%EF%BC%9F\">1.1\u3001\u4ec0\u4e48\u662f\u5783\u573e&#xff08;Garbage)&#xff09;&#xff1f;<\/h4>\n<p>\u00a0 \u00a0 1\u3001\u5783\u573e\u662f\u6307\u5728<span style=\"color:#fe2c24\">\u8fd0\u884c\u7a0b\u5e8f\u4e2d\u6ca1\u6709\u4efb\u4f55\u6307\u9488\u6307\u5411\u7684\u5bf9\u8c61<\/span>&#xff0c;\u8fd9\u4e2a\u5bf9\u8c61\u5c31\u662f\u9700\u8981\u88ab\u56de\u6536\u7684\u5783\u573e\u3002<\/p>\n<p>\u00a0 \u00a0 2\u3001\u5916\u6587:An object is considered garbage when it can no longer be reached from any pointer in the running program.<\/p>\n<p>\u5982\u679c\u4e0d\u53ca\u65f6\u5bf9\u5185\u5b58\u4e2d\u7684\u5783\u573e\u8fdb\u884c\u6e05\u7406&#xff0c;\u90a3\u4e48&#xff0c;\u8fd9\u4e9b\u5783\u573e\u5bf9\u8c61\u6240\u5360\u7684\u5185\u5b58\u7a7a\u95f4\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u5e94\u7528\u7a0b\u5e8f\u7ed3\u675f&#xff0c;\u88ab\u4fdd\u7559\u7684\u7a7a\u95f4\u65e0\u6cd5\u88ab\u5176\u4ed6\u5bf9\u8c61\u4f7f\u7528\u3002\u751a\u81f3\u53ef\u80fd<span style=\"color:#fe2c24\">\u5bfc\u81f4\u5185\u5b58\u6ea2\u51fa\u3002<\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"274\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146f436a2.png\" width=\"431\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"165\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146f5bab7.png\" width=\"426\" \/><\/p>\n<h4 id=\"1.2%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E9%9C%80%E8%A6%81GC%3F\">1.2\u3001\u4e3a\u4ec0\u4e48\u9700\u8981GC?<\/h4>\n<p>\u00a0 \u00a0 \u5bf9\u4e8e\u9ad8\u7ea7\u8bed\u8a00\u6765\u8bf4&#xff0c;\u4e00\u4e2a\u57fa\u672c\u8ba4\u77e5\u662f\u5982\u679c\u4e0d\u8fdb\u884c\u5783\u573e\u56de\u6536&#xff0c;<span style=\"color:#fe2c24\">\u5185\u5b58\u8fdf\u65e9\u90fd\u4f1a\u88ab\u6d88\u8017\u5b8c<\/span>&#xff0c;\u56e0\u4e3a\u4e0d\u65ad\u5730\u5206\u914d\u5185\u5b58\u7a7a\u95f4\u800c\u4e0d\u8fdb\u884c\u56de\u6536&#xff0c;\u5c31\u597d\u50cf\u4e0d\u505c\u5730\u751f\u4ea7\u751f\u6d3b\u5783\u573e\u800c\u4ece\u6765\u4e0d\u6253\u626b\u4e00\u6837\u3002<\/p>\n<p>\u00a0 \u00a0 \u9664\u4e86\u91ca\u653e\u6ca1\u7528\u7684\u5bf9\u8c61&#xff0c;\u5783\u573e\u56de\u6536\u4e5f\u53ef\u4ee5\u6e05\u9664\u5185\u5b58\u91cc\u7684\u8bb0\u5f55\u788e\u7247\u3002\u788e\u7247\u6574\u7406\u5c06\u6240\u5360\u7528\u7684\u5806\u5185\u5b58\u79fb\u5230\u5806\u7684\u4e00\u7aef&#xff0c;\u4ee5\u4fbf <span style=\"color:#fe2c24\">JVM \u5c06\u6574\u7406\u51fa\u7684\u5185\u5b58\u5206\u914d\u7ed9\u65b0\u7684\u5bf9\u8c61<\/span>\u3002<\/p>\n<p>\u00a0 \u00a0 \u968f\u7740\u5e94\u7528\u7a0b\u5e8f\u6240\u5e94\u4ed8\u7684\u4e1a\u52a1\u8d8a\u6765\u8d8a\u5e9e\u5927\u3001\u590d\u6742&#xff0c;\u7528\u6237\u8d8a\u6765\u8d8a\u591a&#xff0c;<span style=\"color:#fe2c24\">\u6ca1\u6709GC\u5c31\u4e0d\u80fd\u4fdd\u8bc1\u5e94\u7528\u7a0b\u5e8f\u7684\u6b63\u5e38\u8fdb\u884c<\/span>\u3002\u800c\u7ecf\u5e38\u9020\u6210STW\u7684GC\u53c8\u8ddf\u4e0d\u4e0a\u5b9e\u9645\u7684\u9700\u6c42&#xff0c;\u6240\u4ee5\u624d\u4f1a\u4e0d\u65ad\u5730\u5c1d\u8bd5\u5bf9GC\u8fdb\u884c\u4f18\u5316\u3002<\/p>\n<p>\u00a0 \u00a0 \u5bf9\u4e8eJava\u5f00\u53d1\u4eba\u5458\u800c\u8a00&#xff0c;\u81ea\u52a8\u5185\u5b58\u7ba1\u7406\u5c31\u50cf\u662f\u4e00\u4e2a\u9ed1\u5323\u5b50&#xff0c;\u5982\u679c\u8fc7\u5ea6\u4f9d\u8d56\u4e8e\u201c\u81ea\u52a8\u201d&#xff0c;\u90a3\u4e48\u8fd9\u5c06\u4f1a\u662f\u4e00\u573a\u707e\u96be&#xff0c;\u6700\u4e25\u91cd\u7684\u5c31\u4f1a<span style=\"color:#fe2c24\">\u5f31\u5316Java\u5f00\u53d1\u4eba\u5458\u5728\u7a0b\u5e8f\u51fa\u73b0\u5185\u5b58\u6ea2\u51fa\u65f6\u5b9a\u4f4d\u95ee\u9898\u548c\u89e3\u51b3\u95ee\u9898\u7684\u80fd\u529b<\/span>\u3002<\/p>\n<p>\u00a0 \u00a0\u00a0\u6b64\u65f6&#xff0c;\u4e86\u89e3]VM\u7684\u81ea\u52a8\u5185\u5b58\u5206\u914d\u548c\u5185\u5b58\u56de\u6536\u539f\u7406\u5c31\u663e\u5f97\u975e\u5e38\u91cd\u8981&#xff0c;\u53ea\u6709\u5728\u771f\u6b63\u4e86\u89e3JVM\u662f\u5982\u4f55\u7ba1\u7406\u5185\u5b58\u540e&#xff0c;\u6211\u4eec\u624d\u80fd\u591f\u5728\u9047\u89c1OutOfMemoryError\u65f6&#xff0c;\u5feb\u901f\u5730\u6839\u636e\u9519\u8bef\u5f02\u5e38\u65e5\u5fd7\u5b9a\u4f4d\u95ee\u9898\u548c\u89e3\u51b3\u95ee\u9898\u3002<\/p>\n<p>\u00a0 \u00a0\u00a0\u5f53\u9700\u8981\u6392\u67e5\u5404\u79cd\u5185\u5b58\u6ea2\u51fa\u3001\u5185\u5b58\u6cc4\u6f0f\u95ee\u9898\u65f6&#xff0c;\u5f53\u5783\u573e\u6536\u96c6\u6210\u4e3a\u7cfb\u7edf\u8fbe\u5230\u66f4\u9ad8\u5e76\u53d1\u91cf\u7684\u74f6\u9888\u65f6&#xff0c;\u6211\u4eec\u5c31\u5fc5\u987b\u5bf9\u8fd9\u4e9b\u201c\u81ea\u52a8\u5316\u201d\u7684\u6280\u672f<span style=\"color:#fe2c24\">\u5b9e\u65bd\u5fc5\u8981\u7684\u76d1\u63a7\u548c\u8c03\u8282<\/span>\u3002<\/p>\n<h4 id=\"1.3%E3%80%81Java%E4%B8%AD%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E7%9A%84%E9%87%8D%E7%82%B9%E5%8C%BA%E5%9F%9F%E6%98%AF%3F\">1.3\u3001Java\u4e2d\u5783\u573e\u56de\u6536\u7684\u91cd\u70b9\u533a\u57df\u662f?<\/h4>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"279\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146f6bb94.png\" width=\"400\" \/><\/p>\n<p>\u00a0 \u00a0 \u5783\u573e\u56de\u6536\u5668\u53ef\u4ee5\u5bf9\u5e74\u8f7b\u4ee3\u56de\u6536&#xff0c;\u4e5f\u53ef\u4ee5\u5bf9\u8001\u5e74\u4ee3\u56de\u6536&#xff0c;\u751a\u81f3\u662f\u5168\u5806\u548c\u65b9\u6cd5\u533a\u7684\u56de\u6536\u3002<\/p>\n<p>\u00a0 \u00a0 \u5176\u4e2d&#xff0c;<span style=\"color:#fe2c24\">Java\u5806\u662f\u5783\u573e\u6536\u96c6\u5668\u7684\u5de5\u4f5c\u91cd\u70b9<\/span>\u3002<\/p>\n<p>\u4ece\u6b21\u6570\u4e0a\u8bb2&#xff1a;1\u3001\u9891\u7e41\u6536\u96c6Young\u533a 2\u3001\u8f83\u5c11\u6536\u96c6Old\u533a 3\u3001\u57fa\u672c\u4e0d\u52a8Perm\u533a(\u6216\u5143\u7a7a\u95f4)<\/p>\n<h4 id=\"1.4%E3%80%81%E6%97%A9%E6%9C%9F%E7%9A%84GC\">1.4\u3001\u65e9\u671f\u7684GC<\/h4>\n<p>\u00a0 \u00a0 \u5728\u65e9\u671f\u7684C\/C&#043;&#043;\u65f6\u4ee3&#xff0c;\u5783\u573e\u56de\u6536\u57fa\u672c\u4e0a\u662f\u624b\u5de5\u8fdb\u884c\u7684\u3002\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528new\u5173\u952e\u5b57\u8fdb\u884c\u5185\u5b58\u7533\u8bf7&#xff0c;\u5e76\u4f7f\u7528delete\u5173\u952e\u5b57\u8fdb\u884c\u5185\u5b58\u91ca\u653e\u3002<\/p>\n<p>\u00a0 \u00a0 \u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u7075\u6d3b\u63a7\u5236\u5185\u5b58\u91ca\u653e\u7684\u65f6\u95f4&#xff0c;\u4f46\u662f\u4f1a\u7ed9\u5f00\u53d1\u4eba\u5458\u5e26\u6765<span style=\"color:#fe2c24\">\u9891\u7e41\u7533\u8bf7\u548c\u91ca\u653e\u5185\u5b58\u7684\u7ba1\u7406\u8d1f\u62c5<\/span>\u3002\u5018\u82e5\u6709\u4e00\u5904\u5185\u5b58\u533a\u95f4\u7531\u4e8e\u7a0b\u5e8f\u5458\u7f16\u7801\u7684\u95ee\u9898\u5fd8\u8bb0\u88ab\u56de\u6536&#xff0c;\u90a3\u4e48\u5c31\u4f1a\u4ea7\u751f<span style=\"color:#fe2c24\">\u5185\u5b58\u6cc4\u6f0f<\/span>&#xff0c;\u5783\u573e\u5bf9\u8c61\u6c38\u8fdc\u65e0\u6cd5\u88ab\u6e05\u9664&#xff0c;\u968f\u7740\u7cfb\u7edf\u8fd0\u884c\u65f6\u95f4\u7684\u4e0d\u65ad\u589e\u957f&#xff0c;\u5783\u573e\u5bf9\u8c61\u6240\u8017\u5185\u5b58\u53ef\u80fd\u6301\u7eed\u4e0a\u5347&#xff0c;\u76f4\u5230\u51fa\u73b0<span style=\"color:#fe2c24\">\u5185\u5b58\u6ea2\u51fa<\/span>\u5e76\u9020\u6210<span style=\"color:#fe2c24\">\u5e94\u7528\u7a0b\u5e8f\u5d29\u6e83<\/span>\u3002<\/p>\n<p>\u00a0 \u00a0 \u73b0\u5728&#xff0c;\u9664\u4e86Java\u4ee5\u5916&#xff0c;C#\u3001Python\u3001Ruby\u7b49\u8bed\u8a00\u90fd\u4f7f\u7528\u4e86<span style=\"color:#fe2c24\">\u81ea\u52a8\u5783\u573e\u56de\u6536<\/span>\u7684\u601d\u60f3&#xff0c;\u4e5f\u662f\u672a\u6765\u53d1\u5c55\u8d8b\u52bf\u3002\u53ef\u4ee5\u8bf4&#xff0c;\u8fd9\u79cd\u81ea\u52a8\u5316\u7684\u5185\u5b58\u5206\u914d\u548c\u5783\u573e\u56de\u6536\u7684\u65b9\u5f0f\u5df2\u7ecf\u6210\u4e3a\u73b0\u4ee3\u5f00\u53d1\u8bed\u8a00\u5fc5\u5907\u7684\u6807\u51c6\u3002<\/p>\n<h3 id=\"2%E3%80%81%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E7%AE%97%E6%B3%95\">2\u3001\u5783\u573e\u56de\u6536\u7b97\u6cd5<\/h3>\n<p>\u9762\u8bd5\u9898&#xff1a;<\/p>\n<p>1\u3001GC\u7684\u7b97\u6cd5&#xff0c;\u590d\u5236\u7b97\u6cd5\u548c\u6807\u8bb0\u6e05\u9664\u7684\u4f18\u7f3a\u70b9?<\/p>\n<p>2\u3001GC \u7684\u4e09\u79cd\u6536\u96c6\u65b9\u6cd5:\u6807\u8bb0\u6e05\u9664\u3001\u6807\u8bb0\u6574\u7406\u3001\u590d\u5236\u7b97\u6cd5\u7684\u539f\u7406\u4e0e\u7279\u70b9&#xff0c;\u5206\u522b\u7528\u5728\u4ec0\u4e48\u5730\u65b9&#xff0c;\u5982\u679c\u8ba9\u4f60\u4f18\u5316\u6536\u96c6\u65b9\u6cd5&#xff0c;\u6709\u4ec0\u4e48\u601d\u8def?<\/p>\n<p>3\u3001JVM GC\u7b97\u6cd5\u6709\u54ea\u4e9b&#xff0c;\u76ee\u524d\u7684DK\u7248\u672c\u91c7\u7528\u4ec0\u4e48\u56de\u6536\u7b97\u6cd5<\/p>\n<p>4\u3001\u5982\u4f55\u5224\u65ad\u4e00\u4e2a\u5bf9\u8c61\u662f\u5426\u5b58\u6d3b?<\/p>\n<p>5\u3001\u4f60\u662f\u7528\u4ec0\u4e48\u65b9\u6cd5\u5224\u65ad\u5bf9\u8c61\u662f\u5426\u6b7b\u4ea1?<\/p>\n<h4 id=\"2.1%E3%80%81%E5%9E%83%E5%9C%BE%E5%88%A4%E5%88%AB%E9%98%B6%E6%AE%B5%E7%AE%97%E6%B3%95\">2.1\u3001\u5783\u573e\u5224\u522b\u9636\u6bb5\u7b97\u6cd5<\/h4>\n<p>\u00a0 \u00a0 \u5728\u5806\u91cc\u5b58\u653e\u7740\u51e0\u4e4e\u6240\u6709\u7684java\u5bf9\u8c61\u5b9e\u4f8b&#xff0c;\u5728GC\u6267\u884c\u5783\u573e\u56de\u6536\u4e4b\u524d&#xff0c;\u9996\u5148\u9700\u8981\u533a\u5206\u51fa\u5185\u5b58\u4e2d\u54ea\u4e9b\u662f\u5b58\u6d3b\u5bf9\u8c61&#xff0c;\u54ea\u4e9b\u662f\u5df2\u7ecf\u6b7b\u4ea1\u7684\u5bf9\u8c61\u3002\u53ea\u6709\u88ab\u6807\u8bb0\u4e3a\u5df2\u7ecf\u6b7b\u4ea1\u7684\u5bf9\u8c61&#xff0c;GC\u624d\u4f1a\u5728\u6267\u884c\u5783\u573e\u56de\u6536\u65f6&#xff0c;\u91ca\u653e\u6389\u5176\u6240\u5360\u7528\u7684\u5185\u5b58\u7a7a\u95f4&#xff0c; \u56e0\u6b64\u8fd9\u4e2a\u8fc7\u7a0b\u6211\u4eec\u53ef\u4ee5\u79f0\u4e3a\u5783\u573e\u6807\u8bb0\u9636\u6bb5\u3002<\/p>\n<p>\u90a3\u4e48\u5728JVM\u4e2d\u7a76\u7adf\u662f\u5982\u4f55\u6807\u8bb0\u4e00\u4e2a\u6b7b\u4ea1\u5bf9\u8c61\u5462?<\/p>\n<p>\u00a0 \u00a0 \u7b80\u5355\u6765\u8bf4&#xff0c;\u5f53\u4e00\u4e2a\u5bf9\u8c61\u5df2\u7ecf\u4e0d\u518d\u88ab\u4efb\u4f55\u7684\u5b58\u6d3b\u5bf9\u8c61\u7ee7\u7eed\u5f15\u7528\u65f6&#xff0c;\u5c31\u53ef\u4ee5\u5ba3\u5224\u4e3a\u5df2\u7ecf\u6b7b\u4ea1\u3002<\/p>\n<h5 id=\"1%E3%80%81%E5%BC%95%E7%94%A8%E8%AE%A1%E6%95%B0%E7%AE%97%E6%B3%95\">1\u3001\u5f15\u7528\u8ba1\u6570\u7b97\u6cd5<\/h5>\n<p>\u00a0 \u00a0 \u5f15\u7528\u8ba1\u6570\u7b97\u6cd5(Reference Counting)\u6bd4\u8f83\u7b80\u5355&#xff0c;\u5bf9\u6bcf\u4e2a\u5bf9\u8c61\u4fdd\u5b58\u4e00\u4e2a\u6574\u578b\u7684<span style=\"color:#fe2c24\">\u5f15\u7528\u8ba1\u6570\u5668\u5c5e\u6027\u3002\u7528\u4e8e\u8bb0\u5f55\u5bf9\u8c61\u88ab\u5f15\u7528\u7684\u60c5\u51b5\u3002<\/span><\/p>\n<p>\u539f\u7406&#xff1a;\u5bf9\u4e8e\u4e00\u4e2a\u5bf9\u8c61A&#xff0c;\u53ea\u8981\u6709\u4efb\u4f55\u4e00\u4e2a\u5bf9\u8c61\u5f15\u7528\u4e86A&#xff0c;\u5219A \u7684\u5f15\u7528\u8ba1\u6570\u5668\u5c31\u52a01&#xff0c;\u5f53\u5f15\u7528\u5931\u6548\u65f6&#xff0c;\u5f15\u7528\u8ba1\u6570\u5668\u5c31\u51cf1\u3002\u53ea\u8981\u5bf9\u8c61A\u7684\u5f15\u7528\u8ba1\u6570\u5668\u7684\u503c\u4e3a8\u5373\u8868\u793a\u5bf9\u8c61A\u4e0d\u53ef\u80fd\u518d\u88ab\u4f7f\u7528&#xff0c;\u53ef\u8fdb\u884c\u56de\u6536\u3002<\/p>\n<p>\u4f18\u70b9&#xff1a;\u5b9e\u73b0\u7b80\u5355&#xff0c;\u5783\u573e\u5bf9\u8c61\u4fbf\u4e8e\u8fa8\u8bc6;\u5224\u5b9a\u6548\u7387\u9ad8&#xff0c;\u56de\u6536\u6ca1\u6709\u5ef6\u8fdf\u6027\u3002<\/p>\n<p>\u7f3a\u70b91&#xff1a;\u5b83\u9700\u8981\u5355\u72ec\u7684\u5b57\u6bb5\u5b58\u50a8\u8ba1\u6570\u5668&#xff0c;\u8fd9\u6837\u7684\u505a\u6cd5\u589e\u52a0\u4e86\u5b58\u50a8\u7a7a\u95f4\u7684\u5f00\u9500\u3002 \u7f3a\u70b92&#xff1a;\u6bcf\u6b21\u8d4b\u503c\u90fd\u9700\u8981\u66f4\u65b0\u8ba1\u6570\u5668&#xff0c;\u4f34\u968f\u7740\u52a0\u6cd5\u548c\u51cf\u6cd5\u64cd\u4f5c&#xff0c;\u8fd9\u589e\u52a0\u4e86\u65f6\u95f4\u5f00\u9500\u3002<\/p>\n<p>\u7f3a\u70b93&#xff1a;\u5f15\u7528\u8ba1\u6570\u5668\u6709\u4e00\u4e2a\u4e25\u91cd\u7684\u95ee\u9898&#xff0c;\u5373<span style=\"color:#fe2c24\">\u65e0\u6cd5\u5904\u7406\u5faa\u73af\u5f15\u7528\u7684\u60c5\u51b5<\/span>\u3002\u8fd9\u662f\u4e00\u6761\u81f4\u547d\u7f3a\u9677&#xff0c;\u5bfc\u81f4\u5728Java \u7684\u5783\u573e\u56de\u6536\u5668\u4e2d\u6ca1\u6709\u4f7f\u7528\u8fd9\u7c7b\u7b97\u6cd5\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"387\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146f7dd00.png\" width=\"648\" \/><\/p>\n<p>\/**<br \/>\n * -XX:&#043;PrintGCDetails -Xms20m -Xmx20m<br \/>\n * \u8bc1\u660e:java\u4f7f\u7528\u7684\u4e0d\u662f\u5f15\u7528\u8ba1\u6570\u7b97\u6cd5<br \/>\n *\/<br \/>\npublic class RefCountGc {<br \/>\n    \/\/ \u8fd9\u4e2a\u6210\u5458\u5c5e\u6027\u552f\u4e00\u7684\u4f5c\u7528\u5c31\u662f\u5360\u7528\u4e00\u70b9\u5185\u5b58<br \/>\n    private byte[] bigSize &#061; new byte[5 * 1024 * 1024];\/\/5MB<br \/>\n    Object reference &#061; null;<\/p>\n<p>    public static void main(String[] args) {<br \/>\n        RefCountGc obj1 &#061; new RefCountGc();<br \/>\n        RefCountGc obj2 &#061; new RefCountGc();<br \/>\n        obj1.reference &#061; obj2;<br \/>\n        obj2.reference &#061; obj1;<br \/>\n        obj1 &#061; null;<br \/>\n        obj2 &#061; null;<\/p>\n<p>        \/\/ \u663e\u5f0f\u7684\u6267\u884c\u5783\u573e\u56de\u6536\u884c\u4e3a<br \/>\n        \/\/ \u8fd9\u91cc\u53d1\u751fGc&#xff0c;obj1\u548cobj2\u80fd\u5426\u88ab\u56de\u6536?<br \/>\n        System.gc();<br \/>\n        try {<br \/>\n            Thread.sleep(1000000);<br \/>\n        } catch (InterruptedException e) {<br \/>\n            throw new RuntimeException(e);<br \/>\n        }<br \/>\n    }<br \/>\n} <\/p>\n<p>\u5982\u679c\u5c31\u60f3\u7528\u6b64\u7b97\u6cd5&#xff0c;\u600e\u4e48\u89e3\u51b3\u5faa\u73af\u5f15\u7528<\/p>\n<p>\u00a0 \u00a0 \u5f15\u7528\u8ba1\u6570\u7b97\u6cd5&#xff0c;\u662f\u5f88\u591a\u8bed\u8a00\u7684\u8d44\u6e90\u56de\u6536\u9009\u62e9&#xff0c;\u4f8b\u5982\u56e0\u4eba\u5de5\u667a\u80fd\u800c\u66f4\u52a0\u706b\u70ed\u7684Python&#xff0c;\u5b83\u66f4\u662f\u540c\u65f6\u652f\u6301\u5f15\u7528\u8ba1\u6570\u548c\u5783\u573e\u6536\u96c6\u673a\u5236\u3002<\/p>\n<p>\u00a0 \u00a0 Java\u5e76\u6ca1\u6709\u9009\u62e9\u5f15\u7528\u8ba1\u6570&#xff0c;\u662f\u56e0\u4e3a\u5176\u5b58\u5728\u4e00\u4e2a\u57fa\u672c\u7684\u96be\u9898&#xff0c;\u4e5f\u5c31\u662f\u5f88\u96be\u5904\u7406\u5faa\u73af\u5f15\u7528\u5173\u7cfb\u3002<\/p>\n<h5 id=\"2%E3%80%81%E5%8F%AF%E8%BE%BE%E6%80%A7%E5%88%86%E6%9E%90%E7%AE%97%E6%B3%95(%E6%88%96%E6%A0%B9%E6%90%9C%E7%B4%A2%E7%AE%97%E6%B3%95%E3%80%81%E8%BF%BD%E8%B8%AA%E6%80%A7%E5%9E%83%E5%9C%BE%E6%94%B6%E9%9B%86)\">2\u3001\u53ef\u8fbe\u6027\u5206\u6790\u7b97\u6cd5(\u6216\u6839\u641c\u7d22\u7b97\u6cd5\u3001\u8ffd\u8e2a\u6027\u5783\u573e\u6536\u96c6)<\/h5>\n<p>\u00a0 \u00a0 \u76f8\u5bf9\u4e8e\u5f15\u7528\u8ba1\u6570\u7b97\u6cd5\u800c\u8a00&#xff0c;\u53ef\u8fbe\u6027\u5206\u6790\u7b97\u6cd5\u4e0d\u4ec5\u540c\u6837\u5177\u5907\u5b9e\u73b0\u7b80\u5355\u548c\u6267\u884c\u9ad8\u6548\u7b49\u7279\u70b9&#xff0c;\u66f4\u91cd\u8981\u7684\u662f\u8be5\u7b97\u6cd5\u53ef\u4ee5\u6709\u6548\u5730<span style=\"color:#956fe7\">\u89e3\u51b3\u5728\u5f15\u7528\u8ba1\u6570\u7b97\u6cd5\u4e2d<\/span><span style=\"color:#fe2c24\">\u5faa\u73af\u5f15\u7528<\/span><span style=\"color:#956fe7\">\u7684\u95ee\u9898&#xff0c;\u9632\u6b62\u5185\u5b58\u6cc4\u6f0f\u7684\u53d1\u751f\u3002<\/span><\/p>\n<p>\u00a0 \u00a0\u00a0\u76f8\u8f83\u4e8e\u5f15\u7528\u8ba1\u6570\u7b97\u6cd5&#xff0c;\u8fd9\u91cc\u7684\u53ef\u8fbe\u6027\u5206\u6790\u5c31\u662f<span style=\"color:#fe2c24\">Java\u3001C#\u9009\u62e9\u7684<\/span>\u3002\u8fd9\u79cd\u7c7b\u578b\u7684\u5783\u573e\u6536\u96c6\u901a\u5e38\u4e5f\u53eb\u4f5c<span style=\"color:#fe2c24\">\u8ffd\u8e2a\u6027\u5783\u573e\u6536\u96c6<\/span>(Tracing Garbage Collection)\u3002<\/p>\n<p>\u539f\u7406&#xff1a;\u5176\u539f\u7406\u7b80\u5355\u6765\u8bf4&#xff0c;\u5c31\u662f\u5c06\u5bf9\u8c61\u53ca\u5176\u5f15\u7528\u5173\u7cfb\u770b\u4f5c\u4e00\u4e2a\u56fe&#xff0c;\u9009\u5b9a\u6d3b\u52a8\u7684\u5bf9\u8c61\u4f5c\u4e3aGCRoots&#xff0c;\u7136\u540e\u8ddf\u8e2a\u5f15\u7528\u94fe\u6761&#xff0c;\u5982\u679c\u4e00\u4e2a\u5bf9\u8c61\u548cGC Roots\u4e4b\u95f4\u4e0d\u53ef\u8fbe&#xff0c;\u4e5f\u5c31\u662f\u4e0d\u5b58\u5728\u5f15\u7528\u94fe\u6761&#xff0c;\u90a3\u4e48\u5373\u53ef\u8ba4\u4e3a\u662f\u53ef\u56de\u6536\u5bf9\u8c61\u3002<\/p>\n<p>\u57fa\u672c\u601d\u8def&#xff1a;<\/p>\n<p>1\u3001\u53ef\u8fbe\u6027\u5206\u6790\u7b97\u6cd5\u662f\u4ee5\u6839\u5bf9\u8c61\u96c6\u5408(GcRoots)\u4e3a\u8d77\u59cb\u70b9&#xff0c;\u6309\u7167\u4ece\u4e0a\u81f3\u4e0b\u7684\u65b9\u5f0f<span style=\"color:#fe2c24\">\u641c\u7d22\u88ab\u6839\u5bf9\u8c61\u96c6\u5408\u6240\u8fde\u63a5\u7684\u76ee\u6807\u5bf9\u8c61\u662f\u5426\u53ef\u8fbe\u3002<\/span><\/p>\n<p>2\u3001\u4f7f\u7528\u53ef\u8fbe\u6027\u5206\u6790\u7b97\u6cd5\u540e&#xff0c;\u5185\u5b58\u4e2d\u7684\u5b58\u6d3b\u5bf9\u8c61\u90fd\u4f1a\u88ab\u6839\u5bf9\u8c61\u96c6\u5408\u76f4\u63a5\u6216\u95f4\u63a5\u8fde\u63a5\u7740&#xff0c;\u641c\u7d22\u6240\u8d70\u8fc7\u7684\u8def\u5f84\u79f0\u4e3a<span style=\"color:#fe2c24\">\u5f15\u7528\u94fe(Reference chain)<\/span>\u3002<\/p>\n<p>3\u3001\u5982\u679c\u76ee\u6807\u5bf9\u8c61\u6ca1\u6709\u4efb\u4f55\u5f15\u7528\u94fe\u76f8\u8fde!\u5219\u662f\u4e0d\u53ef\u8fbe\u7684&#xff0c;\u5c31\u610f\u5473\u7740\u8be5\u5bf9\u8c61\u5df2\u7ecf\u6b7b\u4ea1&#xff0c;\u53ef\u4ee5\u6807\u8bb0\u4e3a\u5783\u573e \u5bf9\u8c61\u3002 4\u3001\u5728\u53ef\u8fbe\u6027\u5206\u6790\u7b97\u6cd5\u4e2d&#xff0c;\u53ea\u6709\u80fd\u591f\u88ab\u6839\u5bf9\u8c61\u96c6\u5408\u76f4\u63a5\u6216\u8005\u95f4\u63a5\u8fde\u63a5\u7684\u5bf9\u8c61\u624d\u662f\u5b58\u6d3b\u5bf9\u8c61\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"275\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146f9fe07.png\" width=\"399\" \/><\/p>\n<p>\u8fd9\u4e2a\u7b97\u6cd5\u76ee\u524d\u8f83\u4e3a\u5e38\u7528\u3002<\/p>\n<p>\u4f18\u70b9&#xff1a;\u5b9e\u73b0\u7b80\u5355&#xff0c;\u6267\u884c\u9ad8\u6548&#xff0c;\u6709\u6548\u7684\u89e3\u51b3\u5faa\u73af\u5f15\u7528\u7684\u95ee\u9898&#xff0c;\u9632\u6b62\u5185\u5b58\u6cc4\u6f0f\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"289\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146fb06ad.png\" width=\"430\" \/><\/p>\n<p>GC Roots<\/p>\n<p>\u5728Java \u8bed\u8a00\u4e2d&#xff0c; GC Roots \u5305\u62ec\u4ee5\u4e0b\u51e0\u7c7b\u5143\u7d20&#xff1a;<\/p>\n<p>1\u3001\u865a\u62df\u673a\u6808\u4e2d\u5f15\u7528\u7684\u5bf9\u8c61\u3002\u6bd4\u5982:\u5404\u4e2a\u7ebf\u7a0b\u88ab\u8c03\u7528\u7684\u65b9\u6cd5\u4e2d\u4f7f\u7528\u5230\u7684\u53c2\u6570\u3001\u5c40\u90e8\u53d8\u91cf\u7b49\u3002 2\u3001\u672c\u5730\u65b9\u6cd5\u6808\u5185JNI(\u901a\u5e38\u8bf4\u7684\u672c\u5730\u65b9\u6cd5)\u5f15\u7528\u7684\u5bf9\u8c61\u3002<\/p>\n<p>3\u3001\u7c7b\u9759\u6001\u5c5e\u6027\u5f15\u7528\u7684\u5bf9\u8c61\u3002\u6bd4\u5982:Java\u7c7b\u7684\u5f15\u7528\u7c7b\u578b\u9759\u6001\u53d8\u91cf 4\u3001\u65b9\u6cd5\u533a\u4e2d\u5e38\u91cf\u5f15\u7528\u7684\u5bf9\u8c61\u3002\u6bd4\u5982:\u5b57\u7b26\u4e32\u5e38\u91cf\u6c60(string Table)\u91cc\u7684\u5f15\u7528 5\u3001\u6240\u6709\u88ab\u540c\u6b65\u9501synchronized\u6301\u6709\u7684\u5bf9\u8c61 6\u3001Java\u865a\u62df\u673a\u5185\u90e8\u7684\u5f15\u7528\u3002 \u00a0 \u00a0 \u00a0\u57fa\u672c\u6570\u636e\u7c7b\u578b\u5bf9\u5e94\u7684class\u5bf9\u8c61&#xff0c;\u4e00\u4e9b\u5e38\u9a7b\u7684\u5f02\u5e38\u5bf9\u8c61(\u5982:NullPointerException\u3001OutofMemoryError)&#xff0c;\u7cfb\u7edf\u7c7b\u52a0\u8f7d\u5668\u3002 7\u3001\u53cd\u6620java\u865a\u62df\u673a\u5185\u90e8\u60c5\u51b5\u7684JMXBean\u3001JVMTI\u4e2d\u6ce8\u518c\u7684\u56de\u8c03\u3001\u672c\u5730\u4ee3\u7801\u7f13\u5b58\u7b49\u3002<\/p>\n<p>8\u3001\u9664\u4e86\u8fd9\u4e9b\u56fa\u5b9a\u7684GC Roots\u96c6\u5408\u4ee5\u5916&#xff0c;\u6839\u636e\u7528\u6237\u6240\u9009\u7528\u7684\u5783\u573e\u6536\u96c6\u5668\u4ee5\u53ca\u5f53\u524d\u56de\u6536\u7684\u5185\u5b58\u533a\u57df\u4e0d\u540c&#xff0c;\u8fd8\u53ef\u4ee5\u6709\u5176\u4ed6\u5bf9\u8c61\u201c\u4e34\u65f6\u6027\u201d\u5730\u52a0\u5165&#xff0c;\u5171\u540c\u6784\u6210\u5b8c\u6574GCRoots\u96c6\u5408\u3002\u6bd4\u5982:\u5206\u4ee3\u6536\u96c6\u548c\u5c40\u90e8\u56de\u6536(Partial Gc)\u3002 \u00a0 \u00a0 \u5982\u679c\u53ea\u9488\u5bf9Java\u5806\u4e2d\u7684\u67d0\u4e00\u5757\u533a\u57df\u8fdb\u884c\u5783\u573e\u56de\u6536(\u6bd4\u5982:\u5178\u578b\u7684\u53ea\u9488\u5bf9\u65b0\u751f\u4ee3)&#xff0c;\u5fc5\u987b\u8003\u8651\u5230\u5185\u5b58\u533a\u57df\u662f\u865a\u62df\u673a\u81ea\u5df1\u7684\u5b9e\u73b0\u7ec6\u8282&#xff0c;\u66f4\u4e0d\u662f\u5b64\u7acb\u5c01\u95ed\u7684&#xff0c;\u8fd9\u4e2a\u533a\u57df\u7684\u5bf9\u8c61\u5b8c\u5168\u6709\u53ef\u80fd\u88ab\u5176\u4ed6\u533a\u57df\u7684\u5bf9\u8c61\u6240\u5f15\u7528&#xff0c;\u8fd9\u65f6\u5019\u5c31\u9700\u8981\u4e00\u5e76\u5c06\u5173\u8054\u7684\u533a\u57df\u5bf9\u8c61\u4e5f\u52a0\u5165GCRoots\u96c6\u5408\u4e2d\u53bb\u8003\u8651&#xff0c;\u624d\u80fd\u4fdd\u8bc1\u53ef\u8fbe\u6027\u5206\u6790\u7684\u51c6\u786e\u6027\u3002<\/p>\n<p>\u5c0f\u6280\u5de7&#xff1a;<span style=\"color:#fe2c24\">\u7531\u4e8eRoot \u91c7\u7528\u6808\u65b9\u5f0f\u5b58\u653e\u53d8\u91cf\u548c\u6307\u9488&#xff0c;\u6240\u4ee5\u5982\u679c\u4e00\u4e2a\u6307\u9488&#xff0c;\u5b83\u4fdd\u5b58\u4e86\u5806\u5185\u5b58\u91cc\u9762\u7684\u5bf9\u8c61&#xff0c;\u4f46\u662f\u81ea\u5df1\u53c8\u4e0d\u5b58\u653e\u5728\u5806\u5185\u5b58\u91cc\u9762&#xff0c;\u90a3\u5b83\u5c31\u662f\u4e00\u4e2aRoot\u3002<\/span><\/p>\n<p>\u9762\u8bd5\u9898&#xff1a;<\/p>\n<p>1\u3001Java Gc\u673a\u5236?GC Roots\u6709\u54ea\u4e9b?<\/p>\n<p>2\u3001\u54ea\u4e9b\u90e8\u5206\u53ef\u4ee5\u4f5c\u4e3aGC Root?<\/p>\n<p>3\u3001JVM\u600e\u6837\u5224\u65ad\u4e00\u4e2a\u5bf9\u8c61\u662f\u5426\u53ef\u56de\u6536&#xff0c;\u600e\u6837\u7684\u5bf9\u8c61\u624d\u80fd\u4f5c\u4e3aGc root&#xff1f;<\/p>\n<p><span style=\"color:null\">\u6ce8\u610f\u70b9&#xff1a;\u5982\u679c\u8981\u4f7f\u7528\u53ef\u8fbe\u6027\u5206\u6790\u7b97\u6cd5\u6765\u5224\u65ad\u5185\u5b58\u662f\u5426\u53ef\u56de\u6536&#xff0c;\u90a3\u4e48\u5206\u6790\u5de5\u4f5c\u5fc5\u987b\u5728\u4e00\u4e2a\u80fd\u4fdd\u969c<\/span><span style=\"color:#fe2c24\">\u4e00\u81f4\u6027\u7684\u5feb\u7167\u4e2d\u8fdb\u884c<\/span><span style=\"color:null\">\u3002\u8fd9\u70b9\u4e0d\u6ee1\u8db3\u7684\u8bdd\u5206\u6790\u7ed3\u679c\u7684\u51c6\u786e\u6027\u5c31\u65e0\u6cd5\u4fdd\u8bc1\u3002<\/span><\/p>\n<p><span style=\"color:null\">\u8fd9\u70b9\u4e5f\u662f\u5bfc\u81f4GC\u8fdb\u884c\u65f6\u5fc5\u987b\u201cStop The World\u201d\u7684\u4e00\u4e2a\u91cd\u8981\u539f\u56e0\u3002 \u5373\u4f7f\u662f\u53f7\u79f0(\u51e0\u4e4e)\u4e0d\u4f1a\u53d1\u751f\u505c\u987f\u7684CMS\u6536\u96c6\u5668\u4e2d&#xff0c;<\/span><span style=\"color:#fe2c24\">\u679a\u4e3e\u6839\u8282\u70b9\u65f6\u4e5f\u662f\u5fc5\u987b\u8981\u505c\u987f\u7684<\/span><span style=\"color:null\">\u3002<\/span><\/p>\n<h4 id=\"2.2%E3%80%81%E5%9E%83%E5%9C%BE%E6%B8%85%E9%99%A4%E9%98%B6%E6%AE%B5%E7%AE%97%E6%B3%95\">2.2\u3001\u5783\u573e\u6e05\u9664\u9636\u6bb5\u7b97\u6cd5<\/h4>\n<p>\u00a0 \u00a0 \u5f53\u6210\u529f\u533a\u5206\u51fa\u5185\u5b58\u4e2d\u5b58\u6d3b\u5bf9\u8c61\u548c\u6b7b\u4ea1\u5bf9\u8c61\u540e&#xff0c;GC\u63a5\u4e0b\u6765\u7684\u4efb\u52a1\u5c31\u662f\u6267\u884c\u5783\u573e\u56de\u6536&#xff0c;\u91ca\u653e\u6389\u65e0\u7528\u5bf9\u8c61\u6240\u5360\u7528\u7684\u5185\u5b58\u7a7a\u95f4&#xff0c;\u4ee5\u4fbf\u6709\u8db3\u591f\u7684\u53ef\u7528\u5185\u5b58\u7a7a\u95f4\u4e3a\u65b0\u5bf9\u8c61\u5206\u914d\u5185\u5b58\u3002\u76ee\u524d\u5728JVM\u4e2d\u6bd4\u8f83\u5e38\u89c1\u7684\u4e09\u79cd\u5783\u573e\u6536\u96c6\u7b97\u6cd5\u662f\u6807\u8bb0-\u6e05\u9664\u7b97\u6cd5(Mark-Sweep)\u3001\u590d\u5236\u7b97\u6cd5(Copying )\u3001\u6807\u8bb0-\u538b\u7f29\u7b97\u6cd5( Mark-Compact)\u3002<\/p>\n<h5 id=\"1%E3%80%81%E6%A0%87%E8%AE%B0-%E6%B8%85%E9%99%A4%E7%AE%97%E6%B3%95\">1\u3001\u6807\u8bb0-\u6e05\u9664\u7b97\u6cd5<\/h5>\n<\/p>\n<h5 id=\"2%E3%80%81%E5%A4%8D%E5%88%B6%E7%AE%97%E6%B3%95\">2\u3001\u590d\u5236\u7b97\u6cd5<\/h5>\n<\/p>\n<h5 id=\"3%E3%80%81%E6%A0%87%E8%AE%B0-%E5%8E%8B%E7%BC%A9%E7%AE%97%E6%B3%95\">3\u3001\u6807\u8bb0-\u538b\u7f29\u7b97\u6cd5<\/h5>\n<\/p>\n<h5 id=\"4%E3%80%81%E5%88%86%E4%BB%A3%E6%94%B6%E9%9B%86%E7%AE%97%E6%B3%95\">4\u3001\u5206\u4ee3\u6536\u96c6\u7b97\u6cd5<\/h5>\n<\/p>\n<h5 id=\"5%E3%80%81%E5%A2%9E%E9%87%8F%E6%94%B6%E9%9B%86%E7%AE%97%E6%B3%95\">5\u3001\u589e\u91cf\u6536\u96c6\u7b97\u6cd5<\/h5>\n<\/p>\n<h5 id=\"6%E3%80%81%E5%88%86%E5%8C%BA%E7%AE%97%E6%B3%95\">6\u3001\u5206\u533a\u7b97\u6cd5<\/h5>\n<\/p>\n<h3 id=\"3%E3%80%81%E7%9B%B8%E5%85%B3%E6%A6%82%E5%BF%B5\">3\u3001\u76f8\u5173\u6982\u5ff5<\/h3>\n<\/p>\n<h3 id=\"4%E3%80%81%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E5%99%A8\">4\u3001\u5783\u573e\u56de\u6536\u5668<\/h3>\n<\/p>\n<h3 id=\"5%E3%80%81%E5%88%86%E6%9E%90GC%E6%97%A5%E5%BF%97\">5\u3001\u5206\u6790GC\u65e5\u5fd7<\/h3>\n<\/p>\n<p>\u00a0 JVM\u5b66\u4e60(\u4e00)<\/p>\n<p>JVM\u5b66\u4e60(\u4e94)&#8211;\u6267\u884c\u5f15\u64ce<\/p>\n<\/p>\n<p><span style=\"color:#fe2c24\">\u518d\u5c0f\u7684\u52aa\u529b&#xff0c;\u4e58\u4ee5365\u90fd\u5f88\u660e\u663e&#xff01; \u6bcf\u5929\u2f64\u2f3c\u8bb0\u5f55\u2f00\u70b9\u70b9\u3002\u5185\u5bb9\u4e5f\u8bb8\u4e0d\u91cd\u8981&#xff0c;\u4f46\u4e60\u60ef\u5f88\u91cd\u8981&#xff01; \u4e00\u4e2a\u7a0b\u5e8f\u5458\u6700\u91cd\u8981\u7684\u80fd\u529b\u662f&#xff1a;\u5199\u51fa\u9ad8\u8d28\u91cf\u7684\u4ee3\u7801&#xff01;&#xff01; \u6709\u9053\u65e0\u672f&#xff0c;\u672f\u5c1a\u53ef\u6c42\u4e5f&#xff0c;\u6709\u672f\u65e0\u9053&#xff0c;\u6b62\u4e8e\u672f\u3002 \u65e0\u8bba\u4f60\u662f\u5e74\u8f7b\u8fd8\u662f\u5e74\u957f&#xff0c;\u6240\u6709\u7a0b\u5e8f\u5458\u90fd\u9700\u8981\u8bb0\u4f4f&#xff1a;\u65f6\u523b\u52aa\u529b\u5b66\u4e60\u65b0\u6280\u672f&#xff0c;\u5426\u5219\u5c31\u4f1a\u88ab\u65f6\u4ee3\u629b\u5f03&#xff01;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb902\u6b21\uff0c\u70b9\u8d5e26\u6b21\uff0c\u6536\u85cf22\u6b21\u3002\u5783\u573e\u6536\u96c6\uff0c\u4e0d\u662fJava\u8bed\u8a00\u7684\u4f34\u751f\u4ea7\u7269\u3002\u65e9\u57281968\u5e74\uff0c\u7b2c\u4e00\u95e8\u5f00\u59cb\u4f7f\u7528\u5185\u5b58\u52a8\u6001\u5206\u914d\u548c\u5783\u573e\u6536\u96c6\u6280\u672f\u7684Lisp\u8bed\u8a00\u8bde\u751f\u30021\u3001\u54ea\u4e9b\u5185\u5b58\u9700\u8981\u56de\u6536\uff1f2\u3001\u4ec0\u4e48\u65f6\u5019\u56de\u6536?3\u3001\u5982\u4f55\u56de\u6536?\u5783\u573e\u6536\u96c6\u673a\u5236\u662fJava\u7684\u62db\u724c\u80fd\u529b\uff0c\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387\u3002\u5982\u4eca\uff0c\u5783\u573e\u6536\u96c6\u51e0\u4e4e\u6210\u4e3a\u73b0\u4ee3\u8bed\u8a00\u7684\u6807\u914d\uff0c\u5373\u4f7f\u7ecf\u8fc7\u5982\u6b64\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cJava\u7684\u5783\u573e\u6536\u96c6\u673a\u5236\u4ecd\u7136\u5728\u4e0d\u65ad\u7684\u6f14\u8fdb\u4e2d\uff0c\u4e0d\u540c\u5927\u5c0f\u7684\u8bbe\u5907\u3001\u4e0d\u540c\u7279\u5f81\u7684\u5e94\u7528\u573a\u666f\uff0c\u5bf9\u5783\u573e\u6536\u96c6\u63d0\u51fa\u4e86\u65b0\u7684\u6311\u6218\uff0c\u8fd9\u5f53\u7136\u4e5f\u662f\u9762\u8bd5\u7684\u70ed\u70b9\u30021.1\u3001\u4ec0\u4e48\u662f\u5783\u573e\uff08Garbage)\uff09\uff1f1\u3001\u5783\u573e\u662f\u6307\u5728\u3002<\/p>\n","protected":false},"author":2,"featured_media":41605,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,426,3831,371],"topic":[],"class_list":{"0":"post-41611","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-java","9":"tag-jvm","11":"tag-371"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JVM\u5b66\u4e60(\u516d)-\u5783\u573e\u56de\u6536 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/41611.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JVM\u5b66\u4e60(\u516d)-\u5783\u573e\u56de\u6536 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb902\u6b21\uff0c\u70b9\u8d5e26\u6b21\uff0c\u6536\u85cf22\u6b21\u3002\u5783\u573e\u6536\u96c6\uff0c\u4e0d\u662fJava\u8bed\u8a00\u7684\u4f34\u751f\u4ea7\u7269\u3002\u65e9\u57281968\u5e74\uff0c\u7b2c\u4e00\u95e8\u5f00\u59cb\u4f7f\u7528\u5185\u5b58\u52a8\u6001\u5206\u914d\u548c\u5783\u573e\u6536\u96c6\u6280\u672f\u7684Lisp\u8bed\u8a00\u8bde\u751f\u30021\u3001\u54ea\u4e9b\u5185\u5b58\u9700\u8981\u56de\u6536\uff1f2\u3001\u4ec0\u4e48\u65f6\u5019\u56de\u6536?3\u3001\u5982\u4f55\u56de\u6536?\u5783\u573e\u6536\u96c6\u673a\u5236\u662fJava\u7684\u62db\u724c\u80fd\u529b\uff0c\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387\u3002\u5982\u4eca\uff0c\u5783\u573e\u6536\u96c6\u51e0\u4e4e\u6210\u4e3a\u73b0\u4ee3\u8bed\u8a00\u7684\u6807\u914d\uff0c\u5373\u4f7f\u7ecf\u8fc7\u5982\u6b64\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cJava\u7684\u5783\u573e\u6536\u96c6\u673a\u5236\u4ecd\u7136\u5728\u4e0d\u65ad\u7684\u6f14\u8fdb\u4e2d\uff0c\u4e0d\u540c\u5927\u5c0f\u7684\u8bbe\u5907\u3001\u4e0d\u540c\u7279\u5f81\u7684\u5e94\u7528\u573a\u666f\uff0c\u5bf9\u5783\u573e\u6536\u96c6\u63d0\u51fa\u4e86\u65b0\u7684\u6311\u6218\uff0c\u8fd9\u5f53\u7136\u4e5f\u662f\u9762\u8bd5\u7684\u70ed\u70b9\u30021.1\u3001\u4ec0\u4e48\u662f\u5783\u573e\uff08Garbage)\uff09\uff1f1\u3001\u5783\u573e\u662f\u6307\u5728\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/41611.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-03T15:27:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146f436a2.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41611.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/41611.html\",\"name\":\"JVM\u5b66\u4e60(\u516d)-\u5783\u573e\u56de\u6536 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-03T15:27:44+00:00\",\"dateModified\":\"2025-06-03T15:27:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/41611.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/41611.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41611.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JVM\u5b66\u4e60(\u516d)--\u5783\u573e\u56de\u6536\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JVM\u5b66\u4e60(\u516d)-\u5783\u573e\u56de\u6536 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/41611.html","og_locale":"zh_CN","og_type":"article","og_title":"JVM\u5b66\u4e60(\u516d)-\u5783\u573e\u56de\u6536 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb902\u6b21\uff0c\u70b9\u8d5e26\u6b21\uff0c\u6536\u85cf22\u6b21\u3002\u5783\u573e\u6536\u96c6\uff0c\u4e0d\u662fJava\u8bed\u8a00\u7684\u4f34\u751f\u4ea7\u7269\u3002\u65e9\u57281968\u5e74\uff0c\u7b2c\u4e00\u95e8\u5f00\u59cb\u4f7f\u7528\u5185\u5b58\u52a8\u6001\u5206\u914d\u548c\u5783\u573e\u6536\u96c6\u6280\u672f\u7684Lisp\u8bed\u8a00\u8bde\u751f\u30021\u3001\u54ea\u4e9b\u5185\u5b58\u9700\u8981\u56de\u6536\uff1f2\u3001\u4ec0\u4e48\u65f6\u5019\u56de\u6536?3\u3001\u5982\u4f55\u56de\u6536?\u5783\u573e\u6536\u96c6\u673a\u5236\u662fJava\u7684\u62db\u724c\u80fd\u529b\uff0c\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387\u3002\u5982\u4eca\uff0c\u5783\u573e\u6536\u96c6\u51e0\u4e4e\u6210\u4e3a\u73b0\u4ee3\u8bed\u8a00\u7684\u6807\u914d\uff0c\u5373\u4f7f\u7ecf\u8fc7\u5982\u6b64\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cJava\u7684\u5783\u573e\u6536\u96c6\u673a\u5236\u4ecd\u7136\u5728\u4e0d\u65ad\u7684\u6f14\u8fdb\u4e2d\uff0c\u4e0d\u540c\u5927\u5c0f\u7684\u8bbe\u5907\u3001\u4e0d\u540c\u7279\u5f81\u7684\u5e94\u7528\u573a\u666f\uff0c\u5bf9\u5783\u573e\u6536\u96c6\u63d0\u51fa\u4e86\u65b0\u7684\u6311\u6218\uff0c\u8fd9\u5f53\u7136\u4e5f\u662f\u9762\u8bd5\u7684\u70ed\u70b9\u30021.1\u3001\u4ec0\u4e48\u662f\u5783\u573e\uff08Garbage)\uff09\uff1f1\u3001\u5783\u573e\u662f\u6307\u5728\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/41611.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-03T15:27:44+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152743-683f146f436a2.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/41611.html","url":"https:\/\/www.wsisp.com\/helps\/41611.html","name":"JVM\u5b66\u4e60(\u516d)-\u5783\u573e\u56de\u6536 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-03T15:27:44+00:00","dateModified":"2025-06-03T15:27:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/41611.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/41611.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/41611.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"JVM\u5b66\u4e60(\u516d)--\u5783\u573e\u56de\u6536"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/41611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=41611"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/41611\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/41605"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=41611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=41611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=41611"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=41611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}