{"id":241,"date":"2026-09-06T00:43:33","date_gmt":"2026-09-05T16:43:33","guid":{"rendered":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/interview-jvm-gc\/"},"modified":"2026-09-06T00:43:33","modified_gmt":"2026-09-05T16:43:33","slug":"interview-jvm-gc","status":"publish","type":"post","link":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/interview-jvm-gc\/","title":{"rendered":"JVM \u4e0e GC \u9762\u8bd5 25 \u95ee\uff1a\u5185\u5b58\u7ed3\u6784\u3001\u56de\u6536\u5668\u9009\u578b\u4e0e\u7ebf\u4e0a\u6392\u67e5"},"content":{"rendered":"<div style=\"font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",sans-serif;font-size:16.5px;line-height:1.9;color:#35435c;letter-spacing:.2px\">\n<div style=\"background:linear-gradient(135deg,#f5f9ff,#eef5ff);border:1px solid #dce8f8;border-left:4px solid #e09a2b;border-radius:12px;padding:16px 20px;margin:0 0 24px;font-size:14.5px;color:#3d5570;line-height:2\"><span style=\"display:inline-block;background:#e09a2b;color:#fff;font-size:12.5px;font-weight:700;padding:3px 10px;border-radius:6px;margin-right:12px;letter-spacing:1px;vertical-align:1px\">\u5173\u952e\u8bcd<\/span>JVM \u9762\u8bd5\u3001GC \u7b97\u6cd5\u3001G1\u3001ZGC\u3001Shenandoah\u3001\u5185\u5b58\u6cc4\u6f0f\u3001JDK 25<\/div>\n<div style=\"background:#fafbfd;border:1px solid #e8edf5;border-radius:12px;padding:18px 22px;margin:0 0 30px\">\n<div style=\"font-size:13.5px;font-weight:700;color:#8a99ae;letter-spacing:2px;margin-bottom:12px\">\u76ee\u5f55<\/div>\n<ol style=\"margin:0;padding-left:20px\">\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-1\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e00\u3001\u8fd0\u884c\u65f6\u6570\u636e\u533a\uff1a\u5148\u5206\u6e05\u54ea\u4e9b\u5171\u4eab\u3001\u54ea\u4e9b\u79c1\u6709<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-2\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e8c\u3001\u5bf9\u8c61\u751f\u547d\u5468\u671f\uff1a\u4e09\u4e2a\u5fc5\u8003\u9898<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-3\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e09\u3001GC \u7b97\u6cd5\uff1a\u4e09\u4e2a\u7b97\u6cd5\u5404\u81ea\u7684\u4ee3\u4ef7<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-4\" style=\"color:#42546e;text-decoration:none;border:none\">\u56db\u3001\u56de\u6536\u5668\u9009\u578b\uff1a2026 \u5e74\u8be5\u7b54\u54ea\u4e9b<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-5\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e94\u3001\u8c03\u4f18\u4e0e\u6392\u67e5\uff1a\u9762\u8bd5\u5b98\u771f\u6b63\u60f3\u542c\u7684\u90e8\u5206<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-6\" style=\"color:#42546e;text-decoration:none;border:none\">\u516d\u3001\u5c0f\u7ed3<\/a><\/li>\n<\/ol>\n<\/div>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\"><span style=\"font-size:17px;color:#1e2f47\">JVM \u662f Java \u540e\u7aef\u9762\u8bd5\u91cc<strong style=\"color:#0f1c2e;font-weight:600\">\u6700\u80fd\u533a\u5206&#8221;\u7528\u8fc7&#8221;\u548c&#8221;\u61c2&#8221;\u7684\u4e00\u5757<\/strong>\u3002\u591a\u6570\u4eba\u80fd\u80cc\u51fa&#8221;\u5806\u5206\u65b0\u751f\u4ee3\u548c\u8001\u5e74\u4ee3&#8221;\uff0c\u4f46\u4e00\u8ffd\u95ee&#8221;\u5bf9\u8c61\u4ec0\u4e48\u65f6\u5019\u8fdb\u5165\u8001\u5e74\u4ee3&#8221;&#8221;G1 \u4e3a\u4ec0\u4e48\u80fd\u8bbe\u505c\u987f\u76ee\u6807&#8221;&#8221;\u7ebf\u4e0a Full GC \u9891\u7e41\u4f60\u600e\u4e48\u6392\u67e5&#8221;\uff0c\u5c31\u9732\u602f\u4e86\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u672c\u6587\u6309<strong style=\"color:#0f1c2e;font-weight:600\">\u5185\u5b58\u7ed3\u6784 \u2192 \u5bf9\u8c61\u751f\u547d\u5468\u671f \u2192 GC \u7b97\u6cd5 \u2192 \u56de\u6536\u5668\u9009\u578b \u2192 \u8c03\u4f18\u6392\u67e5<\/strong>\u4e94\u6bb5\u7ec4\u7ec7\uff0c\u5e76\u7ed3\u5408 JDK 25\uff082025 \u5e74 9 \u6708\u53d1\u5e03\u7684\u6700\u65b0 LTS\uff09\u7684\u65b0\u53d8\u5316\uff0c\u628a 2026 \u5e74\u8be5\u7b54\u5230\u7684\u70b9\u8865\u9f50\u3002<\/p>\n<figure style=\"margin:30px 0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"900\" src=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-jvm-gc-fig.png\" alt=\"Full GC \u9891\u7e41\u7684\u6807\u51c6\u6392\u67e5\u6d41\u7a0b\" class=\"wp-image-240\" style=\"max-width:100%;height:auto;border-radius:12px;border:1px solid #e6ecf4;box-shadow:0 8px 24px rgba(15,30,60,.07)\" srcset=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-jvm-gc-fig.png 1200w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-jvm-gc-fig-300x225.png 300w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-jvm-gc-fig-1024x768.png 1024w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-jvm-gc-fig-768x576.png 768w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-jvm-gc-fig-800x600.png 800w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption style=\"margin-top:12px;font-size:13.5px;color:#7b8aa0;text-align:center;line-height:1.75\">JVM \u6392\u67e5\u6d41\u7a0b\uff1a\u6b62\u8840 \u2192 \u4fdd\u7559\u73b0\u573a \u2192 \u770b\u8d8b\u52bf \u2192 \u770b\u5bf9\u8c61 \u2192 \u5b9a\u4f4d\u4ee3\u7801<\/figcaption><\/figure>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #e09a2b;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-1\">\u4e00\u3001\u8fd0\u884c\u65f6\u6570\u636e\u533a\uff1a\u5148\u5206\u6e05\u54ea\u4e9b\u5171\u4eab\u3001\u54ea\u4e9b\u79c1\u6709<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q1\uff1aJVM \u5185\u5b58\u5206\u54ea\u51e0\u5757\uff1f<\/h3>\n<table style=\"width:100%;border-collapse:collapse;margin:24px 0;font-size:15px;border:1px solid #e3eaf3;border-radius:10px;overflow:hidden\">\n<thead>\n<tr>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u533a\u57df<\/th>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u7ebf\u7a0b\u5171\u4eab<\/th>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u5b58\u4ec0\u4e48<\/th>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u53ef\u80fd\u629b\u4ec0\u4e48\u9519<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u7a0b\u5e8f\u8ba1\u6570\u5668<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u79c1\u6709<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u5f53\u524d\u6307\u4ee4\u5730\u5740<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u65e0\uff08\u552f\u4e00\u4e0d OOM \u7684\u533a\u57df\uff09<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u865a\u62df\u673a\u6808<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u79c1\u6709<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u6808\u5e27\uff08\u5c40\u90e8\u53d8\u91cf\u8868\u3001\u64cd\u4f5c\u6570\u6808\uff09<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">StackOverflowError \/ OOM<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u672c\u5730\u65b9\u6cd5\u6808<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u79c1\u6709<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">Native \u65b9\u6cd5<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u540c\u4e0a<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u5806<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5171\u4eab<\/strong><\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u5bf9\u8c61\u5b9e\u4f8b\u3001\u6570\u7ec4<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\"><code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">OutOfMemoryError: Java heap space<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u65b9\u6cd5\u533a \/ \u5143\u7a7a\u95f4<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5171\u4eab<\/strong><\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u7c7b\u5143\u4fe1\u606f\u3001\u5e38\u91cf\u3001\u9759\u6001\u53d8\u91cf\u3001JIT \u4ee3\u7801\u7f13\u5b58<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\"><code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">OOM: Metaspace<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u9ad8\u9891\u8ffd\u95ee\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u5143\u7a7a\u95f4\uff08Metaspace\uff09\u548c\u6c38\u4e45\u4ee3\uff08PermGen\uff09\u6709\u4ec0\u4e48\u533a\u522b\uff1f<\/strong><\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u6c38\u4e45\u4ee3<\/strong>\uff08JDK 7 \u53ca\u4ee5\u524d\uff09\uff1a\u5728\u5806\u5185\uff0c\u5927\u5c0f\u53d7 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-XX:MaxPermSize<\/code> \u9650\u5236\uff0c\u5bb9\u6613 OOM\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5143\u7a7a\u95f4<\/strong>\uff08JDK 8 \u8d77\uff09\uff1a\u4f7f\u7528<strong style=\"color:#0f1c2e;font-weight:600\">\u672c\u5730\u5185\u5b58<\/strong>\uff0c\u7406\u8bba\u4e0a\u53ea\u53d7\u673a\u5668\u5185\u5b58\u9650\u5236\uff0c\u9ed8\u8ba4\u503c\u6309\u9700\u6269\u5c55\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u8fc1\u79fb\u5e26\u6765\u7684\u5b9e\u9645\u53d8\u5316\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u5b57\u7b26\u4e32\u5e38\u91cf\u6c60\u548c\u9759\u6001\u53d8\u91cf\u79fb\u5230\u4e86\u5806\u91cc<\/strong>\uff08JDK 7 \u5c31\u5f00\u59cb\u8fc1\u79fb\uff09\uff0c\u7c7b\u5143\u4fe1\u606f\u7559\u5728\u5143\u7a7a\u95f4\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u6ce8\u610f\uff1a\u5143\u7a7a\u95f4\u4e0d\u53d7\u9650\u4e0d\u4ee3\u8868\u6ca1\u98ce\u9669\uff0c<strong style=\"color:#0f1c2e;font-weight:600\">\u52a8\u6001\u751f\u6210\u5927\u91cf\u7c7b\uff08CGLib\u3001\u53cd\u5c04\u3001Groovy \u811a\u672c\uff09\u4ecd\u4f1a\u6491\u7206\u672c\u5730\u5185\u5b58<\/strong>\u3002<\/li>\n<\/ul>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q2\uff1a\u5bf9\u8c61\u5728\u5185\u5b58\u91cc\u957f\u4ec0\u4e48\u6837\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5bf9\u8c61\u5934\uff08Mark Word + \u7c7b\u578b\u6307\u9488\uff09+ \u5b9e\u4f8b\u6570\u636e + \u5bf9\u9f50\u586b\u5145\u3002Mark Word \u91cc\u5b58\u7740\u54c8\u5e0c\u7801\u3001GC \u5206\u4ee3\u5e74\u9f84\u3001\u9501\u72b6\u6001\u6807\u5fd7\u2014\u2014<strong style=\"color:#0f1c2e;font-weight:600\">\u8fd9\u4e5f\u662f <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">synchronized<\/code> \u9501\u5347\u7ea7\uff08\u504f\u5411\u9501 \u2192 \u8f7b\u91cf\u7ea7\u9501 \u2192 \u91cd\u91cf\u7ea7\u9501\uff09\u7684\u72b6\u6001\u8f7d\u4f53\u3002<\/strong><\/p>\n<blockquote style=\"margin:24px 0;padding:16px 22px;background:#f7fafd;border-left:4px solid #e09a2b;border-radius:0 10px 10px 0;color:#4a5b73;font-size:15.6px;line-height:1.88\">\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">2026 \u5e74\u52a0\u5206\u70b9\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">JDK 25 \u7684\u7d27\u51d1\u5bf9\u8c61\u5934\uff08JEP 519\uff09\u5df2\u8f6c\u6b63<\/strong>\uff0c\u901a\u8fc7 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-XX:+UseCompactObjectHeaders<\/code> \u53ef\u628a 64 \u4f4d\u5e73\u53f0\u4e0a\u7684\u5bf9\u8c61\u5934\u4ece 96\u2013128 bit \u538b\u7f29\u5230 <strong style=\"color:#0f1c2e;font-weight:600\">64 bit<\/strong>\u3002\u5bf9\u8c61\u5bc6\u96c6\u578b\u7684\u8d1f\u8f7d\u901a\u5e38\u80fd\u7701\u4e0b\u53ef\u89c2\u5806\u5185\u5b58\u5e76\u6539\u5584\u6570\u636e\u5c40\u90e8\u6027\uff0c\u76f8\u5f53\u4e8e\u4e00\u6b21&#8221;\u514d\u8d39\u5347\u7ea7&#8221;\u3002<strong style=\"color:#0f1c2e;font-weight:600\">\u843d\u5730\u524d\u6ce8\u610f\u4e0e\u6240\u7528 GC \u7ec4\u5408\u7684\u517c\u5bb9\u6027\uff0c\u9700\u5728\u76ee\u6807\u73af\u5883\u5b9e\u6d4b\u9a8c\u8bc1\u3002<\/strong><\/p>\n<\/blockquote>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #e09a2b;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-2\">\u4e8c\u3001\u5bf9\u8c61\u751f\u547d\u5468\u671f\uff1a\u4e09\u4e2a\u5fc5\u8003\u9898<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q3\uff1a\u5bf9\u8c61\u600e\u4e48\u5224\u65ad&#8221;\u5df2\u6b7b&#8221;\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u4e0d\u662f\u5f15\u7528\u8ba1\u6570\u6cd5\uff0c\u662f\u53ef\u8fbe\u6027\u5206\u6790\u3002<\/strong>\u4ece GC Roots \u51fa\u53d1\uff0c\u80fd\u88ab\u5f15\u7528\u94fe\u5230\u8fbe\u7684\u5bf9\u8c61\u662f\u5b58\u6d3b\u7684\uff0c\u5176\u4f59\u5224\u5b9a\u4e3a\u53ef\u56de\u6536\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">GC Roots \u5305\u62ec\uff1a\u865a\u62df\u673a\u6808\/\u672c\u5730\u65b9\u6cd5\u6808\u4e2d\u7684\u5f15\u7528\u3001\u65b9\u6cd5\u533a\u4e2d\u9759\u6001\u5c5e\u6027\u548c\u5e38\u91cf\u7684\u5f15\u7528\u3001\u88ab\u540c\u6b65\u9501\u6301\u6709\u7684\u5bf9\u8c61\u3001JVM \u5185\u90e8\u5f15\u7528\uff08\u5982\u7cfb\u7edf\u7c7b\u52a0\u8f7d\u5668\u3001\u5f02\u5e38\u5bf9\u8c61\uff09\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8ffd\u95ee&#8221;<strong style=\"color:#0f1c2e;font-weight:600\">\u5f15\u7528\u8ba1\u6570\u6cd5\u4e3a\u4ec0\u4e48\u4e0d\u7528<\/strong>&#8220;\u2014\u2014\u56e0\u4e3a\u5b83<strong style=\"color:#0f1c2e;font-weight:600\">\u89e3\u51b3\u4e0d\u4e86\u5faa\u73af\u5f15\u7528<\/strong>\uff1aA \u5f15\u7528 B\u3001B \u5f15\u7528 A\uff0c\u4e24\u8005\u8ba1\u6570\u90fd\u4e0d\u4e3a 0\uff0c\u4f46\u5916\u90e8\u5df2\u7ecf\u6ca1\u4eba\u7528\u4e86\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q4\uff1a\u56db\u79cd\u5f15\u7528\u7c7b\u578b\u5206\u522b\u7528\u5728\u4ec0\u4e48\u5730\u65b9\uff1f<\/h3>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5f3a\u5f15\u7528<\/strong>\uff1a\u9ed8\u8ba4\u3002\u53ea\u8981\u5b58\u5728\uff0cGC \u7edd\u4e0d\u56de\u6536\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u8f6f\u5f15\u7528\uff08SoftReference\uff09<\/strong>\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u5185\u5b58\u4e0d\u8db3\u65f6\u624d\u56de\u6536<\/strong>\u3002\u9002\u5408\u505a\u5185\u5b58\u654f\u611f\u7684\u7f13\u5b58\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5f31\u5f15\u7528\uff08WeakReference\uff09<\/strong>\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u4e0b\u4e00\u6b21 GC \u5c31\u56de\u6536<\/strong>\u3002<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">ThreadLocalMap<\/code>\u3001<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">WeakHashMap<\/code> \u7528\u5b83\u6765\u907f\u514d\u5185\u5b58\u6cc4\u6f0f\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u865a\u5f15\u7528\uff08PhantomReference\uff09<\/strong>\uff1a\u5b8c\u5168\u4e0d\u5f71\u54cd\u751f\u547d\u5468\u671f\uff0c\u53ea\u7528\u4e8e\u5728\u5bf9\u8c61\u88ab\u56de\u6536\u65f6\u6536\u5230\u901a\u77e5\u3002\u5178\u578b\u7528\u9014\u662f<strong style=\"color:#0f1c2e;font-weight:600\">\u5806\u5916\u5185\u5b58\u7684\u6e05\u7406<\/strong>\uff08DirectByteBuffer \u7684 Cleaner\uff09\u3002<\/li>\n<\/ul>\n<blockquote style=\"margin:24px 0;padding:16px 22px;background:#f7fafd;border-left:4px solid #e09a2b;border-radius:0 10px 10px 0;color:#4a5b73;font-size:15.6px;line-height:1.88\">\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u9ad8\u9891\u8fde\u73af\u95ee\uff1a&#8221;<strong style=\"color:#0f1c2e;font-weight:600\">ThreadLocal \u4e3a\u4ec0\u4e48\u4f1a\u5185\u5b58\u6cc4\u6f0f\uff1f<\/strong>&#8220;\u2014\u2014<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">ThreadLocalMap<\/code> \u7684 key \u662f\u5f31\u5f15\u7528\uff0cvalue \u662f\u5f3a\u5f15\u7528\u3002key \u88ab GC \u56de\u6536\u540e\u53d8\u6210 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">null<\/code>\uff0c\u4f46 value \u4ecd\u88ab <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">Entry<\/code> \u5f3a\u5f15\u7528\u7740\uff0c\u800c <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">Entry<\/code> \u53c8\u5728\u7ebf\u7a0b\u7684 map \u91cc\u3002\u5982\u679c\u7ebf\u7a0b\u957f\u671f\u4e0d\u7ed3\u675f\uff08<strong style=\"color:#0f1c2e;font-weight:600\">\u7ebf\u7a0b\u6c60\u573a\u666f\u5c24\u5176\u4e25\u91cd<\/strong>\uff09\uff0cvalue \u5c31\u6c38\u8fdc\u65e0\u6cd5\u56de\u6536\u3002<strong style=\"color:#0f1c2e;font-weight:600\">\u89e3\u6cd5\uff1a\u7528\u5b8c\u5fc5\u987b\u8c03\u7528 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">remove()<\/code>\u3002<\/strong><\/p>\n<\/blockquote>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q5\uff1a\u5bf9\u8c61\u4ec0\u4e48\u65f6\u5019\u8fdb\u5165\u8001\u5e74\u4ee3\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u4e09\u6761\u8def\u5f84\uff1a<\/p>\n<ol style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5e74\u9f84\u9608\u503c<\/strong>\uff1a\u6bcf\u71ac\u8fc7\u4e00\u6b21 Minor GC \u5e74\u9f84 +1\uff0c\u9ed8\u8ba4 15\uff08<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-XX:MaxTenuringThreshold<\/code>\uff09\u540e\u664b\u5347\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u52a8\u6001\u5e74\u9f84\u5224\u5b9a<\/strong>\uff1aSurvivor \u533a\u4e2d<strong style=\"color:#0f1c2e;font-weight:600\">\u540c\u9f84\u5bf9\u8c61\u603b\u5927\u5c0f\u8d85\u8fc7 Survivor \u4e00\u534a<\/strong>\u65f6\uff0c\u5927\u4e8e\u7b49\u4e8e\u8be5\u5e74\u9f84\u7684\u5bf9\u8c61\u76f4\u63a5\u8fdb\u5165\u8001\u5e74\u4ee3\u3002<strong style=\"color:#0f1c2e;font-weight:600\">\u8fd9\u6761\u7ecf\u5e38\u88ab\u6f0f\u7b54\u3002<\/strong><\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5927\u5bf9\u8c61\u76f4\u63a5\u8fdb\u8001\u5e74\u4ee3<\/strong>\uff1a\u8d85\u8fc7 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-XX:PretenureSizeThreshold<\/code> \u7684\u5bf9\u8c61\uff08\u5178\u578b\u662f\u957f\u6570\u7ec4\u3001\u5927\u5b57\u7b26\u4e32\uff09\u76f4\u63a5\u5728\u8001\u5e74\u4ee3\u5206\u914d\uff0c\u907f\u514d\u5728 Eden \u548c Survivor \u4e4b\u95f4\u53cd\u590d\u62f7\u8d1d\u3002<\/li>\n<\/ol>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8fd8\u6709\u4e00\u6761<strong style=\"color:#0f1c2e;font-weight:600\">\u7a7a\u95f4\u5206\u914d\u62c5\u4fdd<\/strong>\uff1aMinor GC \u524d JVM \u4f1a\u68c0\u67e5\u8001\u5e74\u4ee3\u5269\u4f59\u7a7a\u95f4\u662f\u5426\u5927\u4e8e\u65b0\u751f\u4ee3\u5bf9\u8c61\u603b\u5927\u5c0f\uff08\u6216\u5386\u6b21\u664b\u5347\u7684\u5e73\u5747\u5927\u5c0f\uff09\uff0c\u4e0d\u591f\u5219\u5148\u89e6\u53d1\u4e00\u6b21 Full GC\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #e09a2b;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-3\">\u4e09\u3001GC \u7b97\u6cd5\uff1a\u4e09\u4e2a\u7b97\u6cd5\u5404\u81ea\u7684\u4ee3\u4ef7<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q6\uff1a\u4e09\u79cd\u57fa\u7840\u7b97\u6cd5\u53ca\u4f18\u52a3\uff1f<\/h3>\n<table style=\"width:100%;border-collapse:collapse;margin:24px 0;font-size:15px;border:1px solid #e3eaf3;border-radius:10px;overflow:hidden\">\n<thead>\n<tr>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u7b97\u6cd5<\/th>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u505a\u6cd5<\/th>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u4f18\u70b9<\/th>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u7f3a\u70b9<\/th>\n<th style=\"background:#f2f6fb;color:#12233a;font-weight:700;padding:12px 14px;text-align:left;border-bottom:1px solid #e3eaf3;font-size:15px\">\u9002\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u6807\u8bb0-\u6e05\u9664<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u6807\u8bb0\u540e\u76f4\u63a5\u6e05\u9664<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u7b80\u5355\uff0c\u4e0d\u79fb\u52a8\u5bf9\u8c61<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\"><strong style=\"color:#0f1c2e;font-weight:600\">\u4ea7\u751f\u5185\u5b58\u788e\u7247<\/strong><\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u8001\u5e74\u4ee3 CMS \u7684\u5e76\u53d1\u6e05\u7406\u9636\u6bb5<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u590d\u5236<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u5b58\u6d3b\u5bf9\u8c61\u590d\u5236\u5230\u53e6\u4e00\u534a\u7a7a\u95f4<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u65e0\u788e\u7247\uff0c\u901f\u5ea6\u5feb<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\"><strong style=\"color:#0f1c2e;font-weight:600\">\u6d6a\u8d39\u4e00\u534a\u7a7a\u95f4<\/strong><\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u65b0\u751f\u4ee3\uff08Eden:Survivor = 8:1:1\uff09<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u6807\u8bb0-\u6574\u7406<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u6807\u8bb0\u540e\u5b58\u6d3b\u5bf9\u8c61\u5f80\u4e00\u7aef\u79fb\u52a8<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u65e0\u788e\u7247\u3001\u4e0d\u6d6a\u8d39\u7a7a\u95f4<\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u79fb\u52a8\u5bf9\u8c61<strong style=\"color:#0f1c2e;font-weight:600\">\u9700\u8981 STW \u4e14\u66f4\u65b0\u5f15\u7528<\/strong><\/td>\n<td style=\"padding:12px 14px;border-bottom:1px solid #eff4fa;color:#3a4a63;line-height:1.75\">\u8001\u5e74\u4ee3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5173\u952e\u7406\u89e3\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u590d\u5236\u7b97\u6cd5\u5728&#8221;\u5927\u90e8\u5206\u5bf9\u8c61\u90fd\u4f1a\u6b7b&#8221;\u7684\u524d\u63d0\u4e0b\u624d\u5212\u7b97<\/strong>\u3002\u65b0\u751f\u4ee3\u5bf9\u8c61\u671d\u751f\u5915\u6b7b\uff08\u901a\u5e38 98% \u4ee5\u4e0a\u6d3b\u4e0d\u8fc7\u4e00\u6b21 GC\uff09\uff0c\u6240\u4ee5\u53ea\u9700\u8981\u4fdd\u7559\u5c11\u91cf\u5b58\u6d3b\u5bf9\u8c61\uff0c10% \u7684 Survivor \u7a7a\u95f4\u5c31\u591f\u4e86\u3002\u8001\u5e74\u4ee3\u5bf9\u8c61\u5b58\u6d3b\u7387\u9ad8\uff0c\u7528\u590d\u5236\u5c31\u5f97\u590d\u5236\u4e00\u5927\u5806\uff0c\u6240\u4ee5\u6539\u7528\u6807\u8bb0-\u6574\u7406\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #e09a2b;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-4\">\u56db\u3001\u56de\u6536\u5668\u9009\u578b\uff1a2026 \u5e74\u8be5\u7b54\u54ea\u4e9b<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q7\uff1a\u4e3b\u6d41\u56de\u6536\u5668\u600e\u4e48\u9009\uff1f<\/h3>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Serial \/ Serial Old<\/strong>\uff1a\u5355\u7ebf\u7a0b\uff0cSTW \u5168\u7a0b\u6682\u505c\u3002\u53ea\u9002\u5408\u5ba2\u6237\u7aef\u6216\u6781\u5c0f\u5806\uff08\u767e MB \u7ea7\uff09\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Parallel \/ Parallel Old<\/strong>\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u541e\u5410\u91cf\u4f18\u5148<\/strong>\uff0c\u591a\u7ebf\u7a0b\u5e76\u884c\u56de\u6536\u4f46 STW\u3002JDK 8 \u9ed8\u8ba4\u3002\u9002\u5408\u6279\u5904\u7406\u3001\u79bb\u7ebf\u8ba1\u7b97\u8fd9\u7c7b<strong style=\"color:#0f1c2e;font-weight:600\">\u4e0d\u5728\u4e4e\u5355\u6b21\u505c\u987f\u3001\u53ea\u5728\u4e4e\u603b\u541e\u5410<\/strong>\u7684\u573a\u666f\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">CMS<\/strong>\uff1a\u5e76\u53d1\u6807\u8bb0\u6e05\u9664\uff0c\u4f4e\u505c\u987f\uff0c\u4f46\u6709\u788e\u7247\u95ee\u9898\u4e14\u5df2<strong style=\"color:#0f1c2e;font-weight:600\">\u5728 JDK 14 \u4e2d\u88ab\u79fb\u9664<\/strong>\u3002\u4e86\u89e3\u5373\u53ef\uff0c\u4e0d\u8981\u5728\u65b0\u9879\u76ee\u91cc\u63d0\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">G1<\/strong>\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">JDK 9 \u8d77\u7684\u9ed8\u8ba4\u56de\u6536\u5668<\/strong>\u3002\u628a\u5806\u5212\u5206\u6210\u591a\u4e2a Region\uff0c<strong style=\"color:#0f1c2e;font-weight:600\">\u53ef\u9884\u6d4b\u7684\u505c\u987f\u65f6\u95f4\u6a21\u578b<\/strong>\uff08<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-XX:MaxGCPauseMillis<\/code>\uff0c\u9ed8\u8ba4 200ms\uff09\uff0c\u901a\u8fc7\u4f18\u5148\u56de\u6536\u6536\u76ca\u6700\u9ad8\u7684 Region\uff08Garbage First\uff09\u6765\u63a7\u5236\u505c\u987f\u3002\u9002\u5408\u5806 4GB\u2013\u6570\u5341 GB\u3001\u8981\u6c42\u5747\u8861\u5ef6\u8fdf\u4e0e\u541e\u5410\u7684\u670d\u52a1\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">ZGC<\/strong>\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u8d85\u4f4e\u5ef6\u8fdf<\/strong>\uff0c\u505c\u987f\u65f6\u95f4\u57fa\u672c\u4e0e\u5806\u5927\u5c0f\u65e0\u5173\uff0c\u53ef\u7a33\u5b9a\u5728<strong style=\"color:#0f1c2e;font-weight:600\">\u6beb\u79d2\u7ea7<\/strong>\uff0c\u652f\u6301 TB \u7ea7\u5806\u3002\u6838\u5fc3\u6280\u672f\u662f<strong style=\"color:#0f1c2e;font-weight:600\">\u67d3\u8272\u6307\u9488\uff08Colored Pointers\uff09+ \u8bfb\u5c4f\u969c\uff08Load Barrier\uff09<\/strong>\uff0c\u5b9e\u73b0\u5e76\u53d1\u6574\u7406\u3002JDK 21 \u8d77\u652f\u6301\u5206\u4ee3\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Shenandoah<\/strong>\uff1a\u4e0e ZGC \u540c\u5c5e\u4f4e\u5ef6\u8fdf\u9635\u8425\uff0c\u6838\u5fc3\u6280\u672f\u662f<strong style=\"color:#0f1c2e;font-weight:600\"> Brooks \u8f6c\u53d1\u6307\u9488 + \u8bfb\u5c4f\u969c<\/strong>\uff0c\u5b9e\u73b0\u5e76\u53d1\u6574\u7406\u3002<strong style=\"color:#0f1c2e;font-weight:600\">JDK 25 \u4e2d\u5206\u4ee3\u6a21\u5f0f\u8f6c\u6b63\uff08JEP 521\uff09<\/strong>\uff0c\u53ef\u7528 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-XX:ShenandoahGCMode=generational<\/code> \u5f00\u542f\uff0c\u5728\u77ed\u751f\u547d\u5468\u671f\u5bf9\u8c61\u4e3a\u4e3b\u7684\u8d1f\u8f7d\u4e0a\u541e\u5410\u8868\u73b0\u66f4\u597d\u3002<\/li>\n<\/ul>\n<blockquote style=\"margin:24px 0;padding:16px 22px;background:#f7fafd;border-left:4px solid #e09a2b;border-radius:0 10px 10px 0;color:#4a5b73;font-size:15.6px;line-height:1.88\">\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u9009\u578b\u5224\u65ad\u53e5\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u5806\u4e0d\u5927\u3001\u8ffd\u6c42\u541e\u5410 \u2192 Parallel\uff1b\u901a\u7528\u670d\u52a1\u7aef\u3001\u8981\u5e73\u8861 \u2192 G1\uff1b\u5ef6\u8fdf\u654f\u611f\u4e14\u5806\u5f88\u5927 \u2192 ZGC \u6216 Shenandoah\u3002<\/strong>\u522b\u4e00\u4e0a\u6765\u5c31\u8bf4&#8221;\u7528 ZGC&#8221;\uff0c\u5b83\u4e3a\u4e86\u4f4e\u5ef6\u8fdf\u4ed8\u51fa\u7684\u662f\u541e\u5410\u91cf\u4e0b\u964d\u548c\u989d\u5916\u7684\u5185\u5b58\u5f00\u9500\uff08\u8bfb\u5c4f\u969c\u6709\u6210\u672c\uff09\u3002<\/p>\n<\/blockquote>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q8\uff1aG1 \u4e3a\u4ec0\u4e48\u80fd\u8bbe\u505c\u987f\u76ee\u6807\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u56e0\u4e3a\u5b83<strong style=\"color:#0f1c2e;font-weight:600\">\u4e0d\u518d\u8981\u6c42\u4e00\u6b21\u628a\u6574\u4e2a\u4ee3\u6e05\u7406\u5e72\u51c0<\/strong>\u3002G1 \u628a\u5806\u5206\u6210\u7ea6 2048 \u4e2a\u5927\u5c0f\u76f8\u7b49\u7684 Region\uff0c\u6bcf\u4e2a Region \u53ef\u4ee5\u5728\u65b0\u751f\u4ee3\u548c\u8001\u5e74\u4ee3\u4e4b\u95f4\u52a8\u6001\u5207\u6362\u89d2\u8272\u3002\u56de\u6536\u65f6\uff1a<\/p>\n<ol style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u5e76\u53d1\u6807\u8bb0\u51fa\u5404\u4e2a Region \u7684\u5b58\u6d3b\u5bf9\u8c61\u6bd4\u4f8b\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u6309&#8221;\u56de\u6536\u6536\u76ca \/ \u505c\u987f\u6210\u672c&#8221;\u6392\u5e8f\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5728\u505c\u987f\u76ee\u6807\u7684\u7ea6\u675f\u4e0b\uff0c\u9009\u62e9\u6536\u76ca\u6700\u9ad8\u7684\u4e00\u6279 Region \u4f5c\u4e3a\u56de\u6536\u96c6\uff08CSet\uff09<\/strong>\uff0c\u91c7\u7528\u590d\u5236\u7b97\u6cd5\u628a\u5b58\u6d3b\u5bf9\u8c61\u590d\u5236\u5230\u7a7a\u95f2 Region\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u4e00\u6b21\u53ea\u56de\u6536\u4e00\u90e8\u5206\uff0c\u5269\u4e0b\u7684\u4e0b\u6b21\u518d\u6765\u3002<\/li>\n<\/ol>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8fd9\u5c31\u662f&#8221;Garbage First&#8221;\u7684\u542b\u4e49\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u4f18\u5148\u56de\u6536\u5783\u573e\u6700\u591a\uff08\u6536\u76ca\u6700\u5927\uff09\u7684\u533a\u57df\uff0c\u4ece\u800c\u5728\u6709\u9650\u7684\u65f6\u95f4\u5185\u62ff\u5230\u6700\u5927\u7684\u7a7a\u95f4\u6536\u76ca\u3002<\/strong><\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q9\uff1aZGC \u7684\u67d3\u8272\u6307\u9488\u662f\u4ec0\u4e48\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u4f20\u7edf\u65b9\u6848\u628a\u5bf9\u8c61\u72b6\u6001\uff08\u662f\u5426\u88ab\u79fb\u52a8\u3001\u662f\u5426\u5b58\u6d3b\uff09\u5b58\u5728<strong style=\"color:#0f1c2e;font-weight:600\">\u5bf9\u8c61\u5934<\/strong>\u91cc\uff0cZGC \u628a\u5b83\u7f16\u7801\u8fdb<strong style=\"color:#0f1c2e;font-weight:600\">64 \u4f4d\u6307\u9488\u7684\u9ad8\u4f4d\u7a7a\u95f2\u6bd4\u7279<\/strong>\u91cc\uff08\u6240\u4ee5\u53eb&#8221;\u67d3\u8272\u6307\u9488&#8221;\uff0c\u4e5f\u53eb Colored Pointer\uff09\u3002\u597d\u5904\u662f\uff1a<\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5e76\u53d1\u6574\u7406\u65f6\u4e0d\u9700\u8981\u8bbf\u95ee\u5bf9\u8c61\u5c31\u80fd\u77e5\u9053\u5b83\u7684\u72b6\u6001<\/strong>\uff0c\u5927\u5927\u51cf\u5c11\u4e86\u5c4f\u969c\u64cd\u4f5c\u7684\u5f00\u9500\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u5bf9\u8c61\u88ab\u79fb\u52a8\u540e\uff0c\u53ea\u9700\u4fee\u6539\u6307\u9488\u7684\u6807\u8bb0\u4f4d\uff1b\u5176\u4ed6\u7ebf\u7a0b\u8bbf\u95ee\u65f6\u4f1a\u901a\u8fc7<strong style=\"color:#0f1c2e;font-weight:600\">\u8bfb\u5c4f\u969c<\/strong>\u89e6\u53d1&#8221;\u81ea\u6108&#8221;\u2014\u2014\u81ea\u52a8\u628a\u6307\u9488\u4fee\u6b63\u5230\u65b0\u5730\u5740\uff0c\u5e76\u91cd\u6620\u5c04\u3002<\/li>\n<\/ul>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u4ee3\u4ef7\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u9700\u8981 64 \u4f4d\u5e73\u53f0\u3001\u4e0d\u652f\u6301\u538b\u7f29\u6307\u9488\uff08Compressed Oops\uff09\u3001\u8bfb\u5c4f\u969c\u5e26\u6765\u4e00\u5b9a\u7684\u8fd0\u884c\u65f6\u5f00\u9500\u3002<\/strong><\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #e09a2b;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-5\">\u4e94\u3001\u8c03\u4f18\u4e0e\u6392\u67e5\uff1a\u9762\u8bd5\u5b98\u771f\u6b63\u60f3\u542c\u7684\u90e8\u5206<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q10\uff1a\u7ebf\u4e0a\u9891\u7e41 Full GC\uff0c\u4f60\u600e\u4e48\u6392\u67e5\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u7ed9\u4e00\u5957\u53ef\u590d\u8ff0\u7684\u6807\u51c6\u6d41\u7a0b\uff1a<\/p>\n<ol style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5148\u6b62\u8840<\/strong>\uff1a\u5982\u679c\u662f\u7a81\u53d1\uff0c\u5148\u6269\u5bb9\u6216\u6458\u6d41\u91cf\uff0c\u91cd\u542f\u5927\u6cd5\u80fd\u4e89\u53d6\u65f6\u95f4\uff0c\u4f46<strong style=\"color:#0f1c2e;font-weight:600\">\u4e00\u5b9a\u8981\u5148\u4fdd\u7559\u73b0\u573a<\/strong>\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u4fdd\u7559\u73b0\u573a<\/strong>\uff1a\u7acb\u5373\u52a0 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\/data\/dump<\/code>\uff1b\u6216\u8005\u624b\u52a8 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">jmap -dump:format=b,file=heap.hprof &lt;pid&gt;<\/code>\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u770b\u8d8b\u52bf<\/strong>\uff1a<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">jstat -gcutil &lt;pid&gt; 1000<\/code> \u89c2\u5bdf\u5404\u533a\u4f7f\u7528\u7387\u4e0e GC \u6b21\u6570\uff0c\u5224\u65ad\u662f\u5185\u5b58\u6cc4\u6f0f\uff08\u8001\u5e74\u4ee3\u6301\u7eed\u4e0a\u6da8\u4e14 GC \u540e\u4e0d\u964d\uff09\u8fd8\u662f\u5bb9\u91cf\u4e0d\u8db3\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u770b\u5bf9\u8c61<\/strong>\uff1a\u7528 MAT \/ JProfiler \u6253\u5f00\u5806\u8f6c\u50a8\uff0c\u770b <strong style=\"color:#0f1c2e;font-weight:600\">Dominator Tree \u91cc\u6700\u5927\u7684\u5bf9\u8c61\u662f\u8c01\u3001\u88ab\u8c01\u5f15\u7528<\/strong>\u3002<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5b9a\u4f4d\u4ee3\u7801<\/strong>\uff1a\u987a\u7740\u5f15\u7528\u94fe\u627e\u5230\u4e1a\u52a1\u4ee3\u7801\uff0c\u5e38\u89c1\u5143\u51f6\u662f<strong style=\"color:#0f1c2e;font-weight:600\">\u65e0\u754c\u96c6\u5408\u7f13\u5b58\u3001ThreadLocal \u672a remove\u3001\u5927\u7ed3\u679c\u96c6\u67e5\u8be2\u3001\u6d41\u672a\u5173\u95ed<\/strong>\u3002<\/li>\n<\/ol>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\"># \u5e38\u7528\u8bca\u65ad\u547d\u4ee4\u901f\u67e5\njps -l                      # \u627e\u8fdb\u7a0b\njstat -gcutil &lt;pid&gt; 1000    # \u5b9e\u65f6 GC \u7edf\u8ba1\njmap -histo &lt;pid&gt; | head -30        # \u6d3b\u5bf9\u8c61\u76f4\u65b9\u56fe\uff08\u8f7b\u91cf\uff09\njmap -dump:live,format=b,file=h.hprof &lt;pid&gt;   # \u5806\u8f6c\u50a8\njstack &lt;pid&gt; &gt; stack.txt    # \u7ebf\u7a0b\u6808\uff08\u67e5\u6b7b\u9501\u3001CPU \u98d9\u9ad8\uff09\njcmd &lt;pid&gt; VM.flags         # \u67e5\u770b\u5b9e\u9645\u751f\u6548\u7684 JVM \u53c2\u6570<\/code><\/pre>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q11\uff1a\u5e38\u7528\u8c03\u4f18\u53c2\u6570\u6709\u54ea\u4e9b\uff1f<\/h3>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\"># \u57fa\u7840\n-Xms4g -Xmx4g               # \u5806\u5927\u5c0f\u8bbe\u4e3a\u76f8\u540c\uff0c\u907f\u514d\u52a8\u6001\u6269\u7f29\u5bb9\u6296\u52a8\n-Xmn2g                      # \u65b0\u751f\u4ee3\u5927\u5c0f\uff08G1 \u4e0b\u4e0d\u5efa\u8bae\u624b\u52a8\u8bbe\uff09\n-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m\n\n# G1\n-XX:+UseG1GC\n-XX:MaxGCPauseMillis=200    # \u505c\u987f\u76ee\u6807\uff0c\u522b\u8bbe\u592a\u5c0f\uff0c\u5426\u5219 GC \u4f1a\u66f4\u9891\u7e41\n-XX:InitiatingHeapOccupancyPercent=45   # \u5e76\u53d1\u6807\u8bb0\u89e6\u53d1\u9608\u503c\n\n# ZGC\n-XX:+UseZGC\n-XX:+UseNUMA                # NUMA \u67b6\u6784\u4e0b\u5f00\u542f\n\n# \u8bca\u65ad\uff08\u751f\u4ea7\u5efa\u8bae\u5e38\u5f00\uff09\n-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\/data\/dump\n-Xlog:gc*:file=\/data\/logs\/gc.log:time,uptime:filecount=10,filesize=100m\n# JDK 25 \u6027\u80fd\u76f8\u5173\n-XX:+UseCompactObjectHeaders             # \u7d27\u51d1\u5bf9\u8c61\u5934\uff08\u9700\u5b9e\u6d4b\u517c\u5bb9\u6027\uff09<\/code><\/pre>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8ffd\u95ee&#8221;<strong style=\"color:#0f1c2e;font-weight:600\">-Xms \u548c -Xmx \u4e3a\u4ec0\u4e48\u8981\u8bbe\u6210\u4e00\u6837<\/strong>&#8220;\u2014\u2014\u907f\u514d JVM \u5728\u8fd0\u884c\u4e2d\u52a8\u6001\u6269\u7f29\u5bb9\uff0c\u6269\u5bb9\u65f6\u9700\u8981\u5411\u64cd\u4f5c\u7cfb\u7edf\u7533\u8bf7\u5185\u5b58\u5e76\u53ef\u80fd\u89e6\u53d1 GC\uff0c\u9020\u6210\u6296\u52a8\u3002\u5bb9\u5668\u5316\u73af\u5883\u4e0b\u8fd9\u4e00\u70b9\u5c24\u5176\u91cd\u8981\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #e09a2b40\">Q12\uff1a\u5bb9\u5668\u73af\u5883\u91cc JVM \u6709\u4ec0\u4e48\u5751\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u7ecf\u5178\u95ee\u9898\uff1aJVM \u5728 JDK 8u191 \u4e4b\u524d<strong style=\"color:#0f1c2e;font-weight:600\">\u4e0d\u8bc6\u522b cgroup \u5185\u5b58\u9650\u5236<\/strong>\uff0c\u4f1a\u6309\u5bbf\u4e3b\u673a\u7684\u7269\u7406\u5185\u5b58\u6765\u7b97\u9ed8\u8ba4\u5806\u5927\u5c0f\u3002\u7ed3\u679c\u5bb9\u5668\u9650\u5236 1GB\uff0cJVM \u5374\u6309 64GB \u5bbf\u4e3b\u673a\u7b97\u51fa\u9ed8\u8ba4\u5806\uff0c\u76f4\u63a5\u88ab OOM Killer \u6740\u6389\u3002<\/p>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\"># \u73b0\u4ee3\u5199\u6cd5\uff08JDK 8u191+ \/ JDK 11+ \u9ed8\u8ba4\u5f00\u542f\uff09\n-XX:+UseContainerSupport\n-XX:MaxRAMPercentage=75.0     # \u6309\u5bb9\u5668\u9650\u5236\u7684\u767e\u5206\u6bd4\u5206\u914d\u5806\uff0c\u6bd4\u5199\u6b7b -Xmx \u66f4\u7075\u6d3b<\/code><\/pre>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u52a0\u5206\u70b9\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u5bb9\u5668\u91cc\u4e0d\u8981\u5199\u6b7b <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-Xmx<\/code>\uff0c\u7528 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">MaxRAMPercentage<\/code><\/strong>\uff0c\u8fd9\u6837\u8c03\u6574 Pod \u7684 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">memory limit<\/code> \u65f6\u4e0d\u7528\u540c\u6b65\u6539 JVM \u53c2\u6570\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #e09a2b;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-6\">\u516d\u3001\u5c0f\u7ed3<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">JVM \u8fd9\u4e00\u5757\u7684\u7b54\u9898\u4e3b\u7ebf\u662f<strong style=\"color:#0f1c2e;font-weight:600\">&#8220;\u5206\u4ee3\u5047\u8bbe \u2192 \u7b97\u6cd5\u53d6\u820d \u2192 \u56de\u6536\u5668\u5b9a\u4f4d&#8221;<\/strong>\uff1a\u7edd\u5927\u591a\u6570\u5bf9\u8c61\u671d\u751f\u5915\u6b7b\uff0c\u6240\u4ee5\u65b0\u751f\u4ee3\u7528\u590d\u5236\u7b97\u6cd5\uff1b\u8001\u5e74\u4ee3\u5b58\u6d3b\u7387\u9ad8\uff0c\u6240\u4ee5\u7528\u6807\u8bb0-\u6574\u7406\uff1b\u56de\u6536\u5668\u7684\u6f14\u8fdb\u4e3b\u7ebf\u662f<strong style=\"color:#0f1c2e;font-weight:600\">\u628a\u8d8a\u6765\u8d8a\u5927\u7684\u5de5\u4f5c\u91cf\u4ece STW \u632a\u5230\u5e76\u53d1\u9636\u6bb5<\/strong>\uff0c\u4ee3\u4ef7\u662f\u541e\u5410\u548c\u989d\u5916\u5f00\u9500\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">2026 \u5e74\u56de\u7b54\u65f6\u8865\u4e0a\u4e09\u70b9\u4f1a\u663e\u5f97\u8ddf\u5f97\u4e0a\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">JDK 25 \u662f\u5f53\u524d LTS<\/strong>\uff1b<strong style=\"color:#0f1c2e;font-weight:600\">\u7d27\u51d1\u5bf9\u8c61\u5934\uff08JEP 519\uff09\u4e0e\u5206\u4ee3 Shenandoah\uff08JEP 521\uff09\u5df2\u8f6c\u6b63<\/strong>\uff1b<strong style=\"color:#0f1c2e;font-weight:600\">\u865a\u62df\u7ebf\u7a0b\u7684 synchronized \u9489\u4f4f\u95ee\u9898\u5df2\u7531 JEP 491 \u57fa\u672c\u89e3\u51b3<\/strong>\u3002<\/p>\n<hr style=\"border:none;border-top:1px solid #eaeef4;margin:34px 0\">\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\"><em style=\"color:#5a6b85;font-style:normal;background:#e09a2b1f;padding:1px 4px;border-radius:4px\">\u53c2\u8003\uff1a<a href=\"https:\/\/openjdk.org\/jeps\/0\" target=\"_blank\" rel=\"noopener\" style=\"color:#e09a2b;text-decoration:none;border-bottom:1px solid #e09a2b66;transition:opacity .15s\">OpenJDK JEP \u7d22\u5f15<\/a>\u3001<a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/25\/gctuning\/\" target=\"_blank\" rel=\"noopener\" style=\"color:#e09a2b;text-decoration:none;border-bottom:1px solid #e09a2b66;transition:opacity .15s\">Oracle JDK 25 GC \u8c03\u4f18\u6307\u5357<\/a>\u3001<a href=\"https:\/\/wiki.openjdk.org\/display\/zgc\/Main\" target=\"_blank\" rel=\"noopener\" style=\"color:#e09a2b;text-decoration:none;border-bottom:1px solid #e09a2b66;transition:opacity .15s\">ZGC Wiki<\/a>\u3002\u53c2\u6570\u4e0e\u7279\u6027\u72b6\u6001\u4ee5\u6240\u7528 JDK \u7248\u672c\u7684\u5b98\u65b9\u6587\u6863\u4e3a\u51c6\u3002<\/em><\/p>\n<div style=\"margin:42px 0 0;padding:22px 0 0;border-top:1px solid #eaeef4\">\n<div style=\"font-size:13px;color:#93a1b5;letter-spacing:1px;margin-bottom:12px\">\u6807\u7b7e<\/div>\n<p><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#JVM<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#GC<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u540e\u7aef\u9762\u8bd5\u9898<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u9762\u8bd5<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>JVM \u662f Java \u540e\u7aef\u9762\u8bd5\u91cc\u6700\u80fd\u533a\u5206\u7528\u8fc7\u548c\u61c2\u7684\u4e00\u5757\u3002\u672c\u6587\u6309\u5185\u5b58\u7ed3\u6784\u3001\u5bf9\u8c61\u751f\u547d\u5468\u671f\u3001GC \u7b97\u6cd5\u3001\u56de\u6536\u5668\u9009\u578b\u3001\u8c03\u4f18\u6392\u67e5\u4e94\u6bb5\u7ec4\u7ec7\uff0c\u5e76\u7ed3\u5408 JDK 25 \u7684\u7d27\u51d1\u5bf9\u8c61\u5934\u4e0e\u5206\u4ee3 Shenandoah \u7b49\u65b0\u53d8\u5316\uff0c\u628a 2026 \u5e74\u8be5\u7b54\u5230\u7684\u70b9\u8865\u9f50\u3002<\/p>\n","protected":false},"author":1,"featured_media":239,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,11],"tags":[117,33,69,66],"class_list":["post-241","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backend-question-bank","category-question-bank","tag-gc","tag-jvm","tag-69","tag-66"],"_links":{"self":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=241"}],"version-history":[{"count":0,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/241\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media\/239"}],"wp:attachment":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}