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:
parent
5290e55164
commit
b36f2db12a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user