We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21a2d5a commit 213cdf6Copy full SHA for 213cdf6
src/runtime/baremetal.go
@@ -46,6 +46,14 @@ func libc_free(ptr unsafe.Pointer) {
46
free(ptr)
47
}
48
49
+//export calloc
50
+func libc_calloc(nmemb, size uintptr) unsafe.Pointer {
51
+ // Note: we could be even more correct here and check that nmemb * size
52
+ // doesn't overflow. However the current implementation should normally work
53
+ // fine.
54
+ return alloc(nmemb * size)
55
+}
56
+
57
//export abort
58
func libc_abort() {
59
abort()
0 commit comments