github.com/primecitizens/pcz/std@v0.2.1/core/alloc/libcalloc/alloc.go (about) 1 package libcalloc 2 3 import ( 4 "unsafe" 5 6 "github.com/primecitizens/pcz/std/core/abi" 7 "github.com/primecitizens/pcz/std/core/alloc" 8 "github.com/primecitizens/pcz/std/core/assert" 9 ) 10 11 type T struct{} 12 13 func (T) Malloc(typ *abi.Type, n uintptr, zeroize bool) unsafe.Pointer { 14 if n == 0 || (typ != nil && typ.Size_ == 0) { 15 return alloc.ZeroSized() 16 } 17 18 assert.TODO() 19 return nil 20 } 21 22 func (T) Palloc(size uintptr) unsafe.Pointer { 23 if size == 0 { 24 return alloc.ZeroSized() 25 } 26 27 assert.TODO() 28 return nil 29 } 30 31 func (T) Free(typ *abi.Type, n uintptr, ptr unsafe.Pointer) alloc.Hint { 32 assert.TODO() 33 return 0 34 }