github.com/primecitizens/pcz/std@v0.2.1/runtime/alloc.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  //go:build pcz
     5  
     6  package runtime
     7  
     8  import (
     9  	"unsafe"
    10  
    11  	"github.com/primecitizens/pcz/std/core/abi"
    12  )
    13  
    14  func explicit_mallocgc(typ *abi.Type, n uintptr, needszero bool) unsafe.Pointer {
    15  	return getg().G().DefaultAlloc().Malloc(typ, n, needszero)
    16  }