MCPcopy Create free account
hub / github.com/egonelbre/exp / Realloc

Method Realloc

mm/malloc.go:26–35  ·  view source on GitHub ↗
(p *unsafe.Pointer, size int)

Source from the content-addressed store, hash-verified

24}
25
26func (m Malloc) Realloc(p *unsafe.Pointer, size int) bool {
27 if size == 0 {
28 m.Dealloc(*p)
29 *p = nil
30 return true
31 }
32
33 *p = unsafe.Pointer(C.realloc(*p, C.size_t(size)))
34 return *p != nil
35}
36
37type Aligned struct{}
38

Callers

nothing calls this directly

Calls 1

DeallocMethod · 0.95

Tested by

no test coverage detected