aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/cgo
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-08-07 13:04:04 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-08-07 13:04:04 +0400
commitcd2f8356ce5515c87710bc7ababfee8fdbdee9c3 (patch)
tree4ff5fb4694288807ade4d080b81f5b0e2fe57907 /src/pkg/runtime/cgo
parent192bccbf33b7493b36989921c8a81ece41904aa5 (diff)
downloadgo-cd2f8356ce5515c87710bc7ababfee8fdbdee9c3.tar.xz
runtime: remove mal/malloc/FlagNoGC/FlagNoInvokeGC
FlagNoGC is unused now. FlagNoInvokeGC is unneeded as we don't invoke GC on g0 and when holding locks anyway. mal/malloc have very few uses and you never remember the exact set of flags they use and the difference between them. Moreover, eventually we need to give exact types to all allocations, something what mal/malloc do not support. LGTM=khr R=golang-codereviews, khr CC=golang-codereviews, rsc https://golang.org/cl/117580043
Diffstat (limited to 'src/pkg/runtime/cgo')
-rw-r--r--src/pkg/runtime/cgo/callbacks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/cgo/callbacks.c b/src/pkg/runtime/cgo/callbacks.c
index 5a4889c9b3..954a1cdcc3 100644
--- a/src/pkg/runtime/cgo/callbacks.c
+++ b/src/pkg/runtime/cgo/callbacks.c
@@ -38,8 +38,8 @@ _cgo_allocate_internal(uintptr len, byte *ret)
{
CgoMal *c;
- ret = runtime·mal(len);
- c = runtime·mal(sizeof(*c));
+ ret = runtime·mallocgc(len, nil, 0);
+ c = runtime·mallocgc(sizeof(*c), nil, 0);
c->next = g->m->cgomal;
c->alloc = ret;
g->m->cgomal = c;