diff options
Diffstat (limited to 'src/pkg/runtime/malloc.go')
| -rw-r--r-- | src/pkg/runtime/malloc.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/runtime/malloc.go b/src/pkg/runtime/malloc.go index cac8f966e7..255778bd2f 100644 --- a/src/pkg/runtime/malloc.go +++ b/src/pkg/runtime/malloc.go @@ -232,6 +232,12 @@ func newarray(typ *_type, n uintptr) unsafe.Pointer { return gomallocgc(uintptr(typ.size)*n, typ, flags) } +// rawmem returns a chunk of pointerless memory. It is +// not zeroed. +func rawmem(size uintptr) unsafe.Pointer { + return gomallocgc(size, nil, flagNoScan|flagNoZero) +} + // round size up to next size class func goroundupsize(size uintptr) uintptr { if size < maxSmallSize { |
