{"id":29288,"date":"2018-06-21T14:54:52","date_gmt":"2018-06-21T05:54:52","guid":{"rendered":"https:\/\/ur.edu-connect.net\/?p=29288"},"modified":"2024-02-03T22:57:28","modified_gmt":"2024-02-03T13:57:28","slug":"mac-osx-high-sierra%e3%81%a7c-stack-size%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/ur.edu-connect.net\/archives\/29288","title":{"rendered":"Mac OSX High Sierra\u3067C stack size\u3092\u5909\u66f4\u3059\u308b"},"content":{"rendered":"\n
\u7d71\u8a08\u30bd\u30d5\u30c8R\u3092MacBook Pro\u3067\u52d5\u304b\u3057\u3066\u3044\u305f\u969b\u3001 Error : C stack usage 26498106 is too close to the limit \u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u8a08\u7b97\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u3053\u306e\u3068\u304d\u306e\u30b9\u30bf\u30c3\u30af\u30b5\u30a4\u30ba\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3057\u305f\u3002<\/p>\n\n\n\n
R\u4e0a\u3067\u78ba\u8a8d\uff1a<\/p>\n\n\n\n
> Cstack_info()\n size current direction eval_depth \n 7969177 15272 1 2 \n<\/code><\/pre>\n\n\n\nMac\u306eTerminal\u3067\u78ba\u8a8d\uff1a<\/p>\n\n\n\n
$ ulimit -s\nstack size (kbytes, -s) 8192\n\n$ sudo launchctl limit\nstack 8388608 67104768 \n<\/code><\/pre>\n\n\n\n\u3044\u308d\u3044\u308d\u3068\u8abf\u3079\u3066\u307f\u308b\u3068\u3001<\/p>\n\n\n\n
$ ulimit -s 65532<\/code><\/pre>\n\n\n\n\u306a\u3069\u3068\u3059\u308c\u3070\u3001\u305d\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u547c\u3073\u51fa\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u306f\u3001\u65b0\u3057\u3044\u30b9\u30bf\u30c3\u30af\u30b5\u30a4\u30ba\u304c\u9069\u7528\u3055\u308c\u308b\u306a\u3069\u306e\u8a18\u8ff0\u304c\u3042\u3063\u305f\u3082\u306e\u306e\u3001\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u5f8c\u306bR\u3084RStudio\u3092\u547c\u3073\u51fa\u3057\u3066\u3082\u3001\u30b9\u30bf\u30c3\u30af\u30b5\u30a4\u30ba\u306f7969177\u306e\u307e\u307e\u3067\u3057\u305f\u3002<\/p>\n\n\n\n
\u3069\u3046\u3084\u3089 launchctl limit \u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5024\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u3067\u3001\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001 limit.stack.plist \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u914d\u7f6e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n
$ cd \/Library\/LaunchDaemons\/\n$ sudo vi limit.stack.plist\n\n<plist version=\"1.0\">\n<dict>\n<key>Label<\/key>\n<string>limit.maxfiles<\/string>\n<key>ProgramArguments<\/key>\n<array>\n<string>launchctl<\/string>\n<string>limit<\/string>\n<string>stack<\/string>\n<string>67104768<\/string>\n<string>67104768<\/string>\n<\/array>\n<key>RunAtLoad<\/key>\n<true\/>\n<key>ServiceIPC<\/key>\n<false\/>\n<\/dict>\n<\/plist>\n<\/code><\/pre>\n\n\n\n\u518d\u8d77\u52d5\u5f8c\uff1a<\/p>\n\n\n\n
> Cstack_info()\nsize current direction eval_depth\n63749529 17072 1 2\n\n$ ulimit -s\nstack size (kbytes, -s) 65532\n\n$ sudo launchctl limit\nstack 67104768 67104768<\/code><\/pre>\n\n\n\n\u7121\u4e8b\u3001\u30b9\u30bf\u30c3\u30af\u30b5\u30a4\u30ba\u3092\u5897\u52a0\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u7d71\u8a08\u30bd\u30d5\u30c8R\u3092MacBook Pro\u3067\u52d5\u304b\u3057\u3066\u3044\u305f\u969b\u3001 Error : C stack usage 26498106 is too close to the limit \u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u8a08\u7b97\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u3053\u306e\u3068\u304d\u306e\u30b9\u30bf\u30c3\u30af\u30b5\u30a4\u30ba\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3057\u305f\u3002 R\u4e0a\u3067\u78ba\u8a8d\uff1a Mac\u306eTerminal\u3067\u78ba\u8a8d\uff1a \u3044\u308d\u3044\u308d\u3068\u8abf\u3079\u3066\u307f\u308b\u3068\u3001 \u306a\u3069\u3068\u3059\u308c\u3070\u3001\u305d\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u547c\u3073\u51fa\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u306f\u3001\u65b0\u3057\u3044\u30b9\u30bf\u30c3\u30af\u30b5\u30a4\u30ba\u304c\u9069\u7528 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[111,176],"class_list":["post-29288","post","type-post","status-publish","format-standard","hentry","category-misc","tag-mac","tag-r"],"_links":{"self":[{"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/posts\/29288"}],"collection":[{"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/comments?post=29288"}],"version-history":[{"count":3,"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/posts\/29288\/revisions"}],"predecessor-version":[{"id":29670,"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/posts\/29288\/revisions\/29670"}],"wp:attachment":[{"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/media?parent=29288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/categories?post=29288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ur.edu-connect.net\/wp-json\/wp\/v2\/tags?post=29288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}