{"id":32530,"date":"2022-11-05T13:17:47","date_gmt":"2024-03-11T15:23:38","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/"},"modified":"2024-04-28T23:10:19","modified_gmt":"2024-04-28T15:10:19","slug":"max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/","title":{"rendered":"&#8211;max_old_space_size\u6216&#8211;max-old-space-size\u6216&#8211;max_old_space_size"},"content":{"rendered":"<p>\u5982\u679c\u5728\u8c37\u6b4c\u4e0a\u641c\u7d22\uff0c\u4e24\u79cd\u65b9\u5f0f\u90fd\u4f1a\u51fa\u73b0\u3002\u8fde\u5b57\u7b26\u548c\u4e0b\u5212\u7ebf\uff0c\u54ea\u79cd\u662f\u6b63\u786e\u7684\u5462\uff1f<\/p>\n<h2>\u592a\u957f\u61d2\u5f97\u8bfb\uff1b<\/h2>\n<p>\u4e0d\u7ba1\u662f\u5168\u90e8\u90fd\u597d\uff0c\u8fd8\u662f\u6df7\u5408\u4e5f\u597d\u90fd\u53ef\u4ee5\u3002<\/p>\n<pre class=\"post-pre\"><code>node <span class=\"nt\">--max_old_space_size<\/span> .\/server.js <span class=\"c\"># \u30a2\u30f3\u30c0\u30fc\u30b9\u30b3\u30a2OK<\/span>\r\nnode <span class=\"nt\">--max-old-space-size<\/span> .\/server.js <span class=\"c\"># \u30cf\u30a4\u30d5\u30f3OK<\/span>\r\nnode <span class=\"nt\">--max-old-space-size<\/span> .\/server.js <span class=\"c\"># \u6df7\u305c\u3066\u3082OK<\/span>\r\n<\/code><\/pre>\n<p>\u5728v8.2\u4e4b\u524d\uff0c\u53ea\u6709\u4e0b\u5212\u7ebf\u662f\u53ef\u4ee5\u4f7f\u7528\u7684\u3002<\/p>\n<pre class=\"post-pre\"><code>$HOME\/.nvm\/versions\/node\/v7.10.1\/bin\/node --max_old_space_size .\/server.js # OK\r\n$HOME\/.nvm\/versions\/node\/v7.10.1\/bin\/node --max-old-space-size .\/server.js # NG\r\n<\/code><\/pre>\n<h2>\u94fe\u63a5<\/h2>\n<p>v8.2.0 proposal by addaleax \u00b7 Pull Request #13744 \u00b7 nodejs\/node<\/p>\n<p>src: whitelist v8 options with &#8216;_&#8217; or &#8216;-&#8216; by sam-github \u00b7 Pull Request #14093 \u00b7 nodejs\/node<\/p>\n<p>&#8220;All options, including V8 options, allow words to be separated by both dashes (-) or underscores (_).&#8221;<\/p>\n<p>https:\/\/nodejs.org\/docs\/latest-v12.x\/api\/cli.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u5728\u8c37\u6b4c\u4e0a\u641c\u7d22\uff0c\u4e24\u79cd\u65b9\u5f0f\u90fd\u4f1a\u51fa\u73b0\u3002\u8fde\u5b57\u7b26\u548c\u4e0b\u5212\u7ebf\uff0c\u54ea\u79cd\u662f\u6b63\u786e\u7684\u5462\uff1f \u592a\u957f\u61d2\u5f97\u8bfb\uff1b \u4e0d\u7ba1\u662f\u5168\u90e8\u90fd\u597d\uff0c\u8fd8\u662f\u6df7\u5408\u4e5f [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32530","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>-max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"--max_old_space_size\u6216--max-old-space-size\u6216--max_old_space_size\" \/>\n<meta property=\"og:description\" content=\"\u5982\u679c\u5728\u8c37\u6b4c\u4e0a\u641c\u7d22\uff0c\u4e24\u79cd\u65b9\u5f0f\u90fd\u4f1a\u51fa\u73b0\u3002\u8fde\u5b57\u7b26\u548c\u4e0b\u5212\u7ebf\uff0c\u54ea\u79cd\u662f\u6b63\u786e\u7684\u5462\uff1f \u592a\u957f\u61d2\u5f97\u8bfb\uff1b \u4e0d\u7ba1\u662f\u5168\u90e8\u90fd\u597d\uff0c\u8fd8\u662f\u6df7\u5408\u4e5f [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-11T15:23:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-28T15:10:19+00:00\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/\",\"name\":\"-max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-03-11T15:23:38+00:00\",\"dateModified\":\"2024-04-28T15:10:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"&#8211;max_old_space_size\u6216&#8211;max-old-space-size\u6216&#8211;max_old_space_size\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"-max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size-2\/","og_locale":"zh_CN","og_type":"article","og_title":"--max_old_space_size\u6216--max-old-space-size\u6216--max_old_space_size","og_description":"\u5982\u679c\u5728\u8c37\u6b4c\u4e0a\u641c\u7d22\uff0c\u4e24\u79cd\u65b9\u5f0f\u90fd\u4f1a\u51fa\u73b0\u3002\u8fde\u5b57\u7b26\u548c\u4e0b\u5212\u7ebf\uff0c\u54ea\u79cd\u662f\u6b63\u786e\u7684\u5462\uff1f \u592a\u957f\u61d2\u5f97\u8bfb\uff1b \u4e0d\u7ba1\u662f\u5168\u90e8\u90fd\u597d\uff0c\u8fd8\u662f\u6df7\u5408\u4e5f [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-11T15:23:38+00:00","article_modified_time":"2024-04-28T15:10:19+00:00","author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/","name":"-max_old_space_size\u6216-max-old-space-size\u6216-max_old_space_size - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-03-11T15:23:38+00:00","dateModified":"2024-04-28T15:10:19+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"&#8211;max_old_space_size\u6216&#8211;max-old-space-size\u6216&#8211;max_old_space_size"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/max_old_space_size%e6%88%96-max-old-space-size%e6%88%96-max_old_space_size-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=32530"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32530\/revisions"}],"predecessor-version":[{"id":64019,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32530\/revisions\/64019"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=32530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=32530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=32530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}