Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoAllocC ¶
func DoAllocC(size int)
DoAllocC does an allocation purely in C without invoking cgo's malloc wrapper.
func DoAllocGo ¶
func DoAllocGo(size int)
DoAllocGo does an allocation with C.malloc, which is special because cgo creates a wrapper that panics on NULL returns from malloc and lets 0-byte allocations succeed.
func DoCalloc ¶
func DoCalloc(size int)
DoCalloc invokes calloc from Go, which should *not* be get a special wrapper.
func DoLibcAlloc ¶
func DoLibcAlloc()
DoLibcAlloc calls a libc function (in this case, strdup) which is documented to allocate memory using malloc. This is for testing that we can intercept references to malloc which might happen in dynamic libraries and thus can't be detected at compile-time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.