summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/string.cgo
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-04-09 15:30:40 -0700
committerRuss Cox <rsc@golang.org>2010-04-09 15:30:40 -0700
commit79da15518c65196d0a6eb86d682c74161f6e2ef4 (patch)
tree45108c80c561d126a26fc4ddcd55e275f4e8d8d4 /src/pkg/runtime/string.cgo
parentd13ec30e1e389fcd90e9d3be49765f49bf791f93 (diff)
downloadgolang-79da15518c65196d0a6eb86d682c74161f6e2ef4.tar.gz
runtime: delete malx, skip_depth argument to malloc
remove internal functions from traces in gopprof instead. R=r CC=golang-dev http://codereview.appspot.com/855046
Diffstat (limited to 'src/pkg/runtime/string.cgo')
-rw-r--r--src/pkg/runtime/string.cgo6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/runtime/string.cgo b/src/pkg/runtime/string.cgo
index 005b0ffc8..103ac329b 100644
--- a/src/pkg/runtime/string.cgo
+++ b/src/pkg/runtime/string.cgo
@@ -41,7 +41,7 @@ gostringsize(int32 l)
if(l == 0)
return emptystring;
- s.str = malx(l+1, 1); // leave room for NUL for C runtime (e.g., callers of getenv)
+ s.str = mal(l+1); // leave room for NUL for C runtime (e.g., callers of getenv)
s.len = l;
if(l > maxstring)
maxstring = l;
@@ -197,7 +197,7 @@ func slicebytetostring(b Slice) (s String) {
}
func stringtoslicebyte(s String) (b Slice) {
- b.array = mallocgc(s.len, RefNoPointers, 1, 1, 1);
+ b.array = mallocgc(s.len, RefNoPointers, 1, 1);
b.len = s.len;
b.cap = s.len;
mcpy(b.array, s.str, s.len);
@@ -240,7 +240,7 @@ func stringtosliceint(s String) (b Slice) {
n++;
}
- b.array = mallocgc(n*sizeof(r[0]), RefNoPointers, 1, 1, 1);
+ b.array = mallocgc(n*sizeof(r[0]), RefNoPointers, 1, 1);
b.len = n;
b.cap = n;
p = s.str;