1
0
mirror of https://github.com/golang/go synced 2024-11-26 14:46:47 -07:00

runtime: use persistentalloc instead of mallocgc for itab

Reduces heap size.

R=golang-dev, remyoudompheng, bradfitz
CC=golang-dev
https://golang.org/cl/10139043
This commit is contained in:
Dmitriy Vyukov 2013-06-09 21:58:35 +04:00
parent 5290e55164
commit b36f2db12a
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -418,6 +418,7 @@ struct Func
};
// layout of Itab known to compilers
// allocated in non-garbage-collected memory
struct Itab
{
InterfaceType* inter;