Commit b36f2db1 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: use persistentalloc instead of mallocgc for itab

Reduces heap size.

R=golang-dev, remyoudompheng, bradfitz
CC=golang-dev
https://golang.org/cl/10139043
parent 5290e551
......@@ -85,7 +85,7 @@ itab(InterfaceType *inter, Type *type, int32 canfail)
}
ni = inter->mhdr.len;
m = runtime·malloc(sizeof(*m) + ni*sizeof m->fun[0]);
m = runtime·persistentalloc(sizeof(*m) + ni*sizeof m->fun[0], 0);
m->inter = inter;
m->type = type;
......
......@@ -418,6 +418,7 @@ struct Func
};
// layout of Itab known to compilers
// allocated in non-garbage-collected memory
struct Itab
{
InterfaceType* inter;
......
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