Commit 7e7008fa authored by Christopher Wedgwood's avatar Christopher Wedgwood Committed by Russ Cox

gc: Allow allow data types up to 1GB

R=rsc
https://golang.org/cl/164095
parent 6db683fe
...@@ -52,7 +52,7 @@ allocparams(void) ...@@ -52,7 +52,7 @@ allocparams(void)
continue; continue;
dowidth(n->type); dowidth(n->type);
w = n->type->width; w = n->type->width;
if(w >= 100000000) if(w >= MAXWIDTH)
fatal("bad width"); fatal("bad width");
stksize += w; stksize += w;
stksize = rnd(stksize, w); stksize = rnd(stksize, w);
......
...@@ -53,7 +53,8 @@ enum ...@@ -53,7 +53,8 @@ enum
AINTER, AINTER,
ANILINTER, ANILINTER,
BADWIDTH = -1000000000 BADWIDTH = -1000000000,
MAXWIDTH = 1<<30
}; };
/* /*
......
...@@ -2431,7 +2431,7 @@ setmaxarg(Type *t) ...@@ -2431,7 +2431,7 @@ setmaxarg(Type *t)
dowidth(t); dowidth(t);
w = t->argwid; w = t->argwid;
if(t->argwid >= 100000000) if(t->argwid >= MAXWIDTH)
fatal("bad argwid %T", t); fatal("bad argwid %T", t);
if(w > maxarg) if(w > maxarg)
maxarg = w; maxarg = w;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment