]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/malloc.go
[dev.garbage] all: merge default (f38460037b72) into dev.garbage
[gostls13.git] / src / runtime / malloc.go
index a18e77421e886b0a243a30871624c8f0e9408797..fab8cf269579f423341b45a4c94f4f21e49e19a1 100644 (file)
@@ -41,7 +41,7 @@ var zerobase uintptr
 // Allocate an object of size bytes.
 // Small objects are allocated from the per-P cache's free lists.
 // Large objects (> 32 kB) are allocated straight from the heap.
-func mallocgc(size uintptr, typ *_type, flags int) unsafe.Pointer {
+func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer {
        if size == 0 {
                return unsafe.Pointer(&zerobase)
        }
@@ -391,7 +391,7 @@ func loadPtrMask(typ *_type) []uint8 {
 
 // implementation of new builtin
 func newobject(typ *_type) unsafe.Pointer {
-       flags := 0
+       flags := uint32(0)
        if typ.kind&kindNoPointers != 0 {
                flags |= flagNoScan
        }
@@ -400,7 +400,7 @@ func newobject(typ *_type) unsafe.Pointer {
 
 // implementation of make builtin for slices
 func newarray(typ *_type, n uintptr) unsafe.Pointer {
-       flags := 0
+       flags := uint32(0)
        if typ.kind&kindNoPointers != 0 {
                flags |= flagNoScan
        }