Этот коммит содержится в:
waj334 2022-10-30 14:17:09 -05:00 коммит произвёл Ron Evans
родитель 580fd490a5
коммит ad544b5133

Просмотреть файл

@ -42,6 +42,12 @@ func libc_malloc(size uintptr) unsafe.Pointer {
return alloc(size, nil) return alloc(size, nil)
} }
//export calloc
func libc_calloc(nmemb, size uintptr) unsafe.Pointer {
// No difference between calloc and malloc.
return libc_malloc(nmemb * size)
}
//export free //export free
func libc_free(ptr unsafe.Pointer) { func libc_free(ptr unsafe.Pointer) {
free(ptr) free(ptr)