ref: 6018316eef179f421ee2b31ec76a9f3638e9bc15
parent: 1fe3143e4c43ce2c74e0cfdd70b1bd556bbb9e1b
author: Sigrid <ftrvxmtrx@gmail.com>
date: Fri Apr 10 13:19:44 EDT 2020
cc: sbrk in bigger chunks as it grows, so it gets a chance to use the ram/swap available
--- a/sys/src/cmd/cc/macbody
+++ b/sys/src/cmd/cc/macbody
@@ -854,9 +854,16 @@
char *h;
long nh;
- nh = NHUNK;
- if(thunk >= 10L*NHUNK)
+ if(thunk >= 100L*NHUNK)
+ nh = 100L*NHUNK;
+ else if(thunk >= 50L*NHUNK)
+ nh = 50L*NHUNK;
+ else if(thunk >= 25L*NHUNK)
+ nh = 25L*NHUNK;
+ else if(thunk >= 10L*NHUNK)
nh = 10L*NHUNK;
+ else
+ nh = NHUNK;
h = (char*)mysbrk(nh);
if(h == (char*)-1) {
yyerror("out of memory");