aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/malloc.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-01 18:51:12 -0400
committerRuss Cox <rsc@golang.org>2014-09-01 18:51:12 -0400
commit548d0805f738c5f4d5bb7e72334b80c2acff059d (patch)
tree46e6202941a339e08fe7d57553fa9a0957add949 /src/pkg/runtime/malloc.go
parent60be96217d4192312295c89731ab1239a73235e7 (diff)
downloadgo-548d0805f738c5f4d5bb7e72334b80c2acff059d.tar.xz
runtime: convert mprof.goc to mprof.go
The exported Go definitions appearing in mprof.go are copied verbatim from debug.go. The unexported Go funcs and types are new. The C Bucket type used a union and was not a line-for-line translation. LGTM=remyoudompheng R=golang-codereviews, remyoudompheng CC=dvyukov, golang-codereviews, iant, khr, r https://golang.org/cl/137040043
Diffstat (limited to 'src/pkg/runtime/malloc.go')
-rw-r--r--src/pkg/runtime/malloc.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pkg/runtime/malloc.go b/src/pkg/runtime/malloc.go
index 49afc67364..5b1825a04c 100644
--- a/src/pkg/runtime/malloc.go
+++ b/src/pkg/runtime/malloc.go
@@ -397,9 +397,8 @@ func profilealloc(mp *m, x unsafe.Pointer, size uintptr) {
}
c.next_sample = next
}
- mp.scalararg[0] = uintptr(size)
- mp.ptrarg[0] = x
- onM(&mprofMalloc_m)
+
+ mProf_Malloc(x, size)
}
// force = 1 - do GC regardless of current heap usage