1///|
2pub extern "c" fn malloc(count : UInt64) -> Ptr[Byte] = "moonbit_native_malloc"
3
4///|
5pub extern "c" fn free(ptr : Ptr[Byte]) = "moonbit_native_free"
6
7///|
8pub extern "c" fn realloc(ptr : Ptr[Byte], count : UInt64) -> Ptr[Byte] = "moonbit_native_realloc"
9
10///|
11pub extern "c" fn memset(ptr : Ptr[Byte], val : Byte, count : UInt64) = "moonbit_native_memset"
12
13///|
14pub extern "c" fn memcpy(
15 dest : Ptr[Byte],
16 src : ConstPtr[Byte],
17 count : UInt64
18) = "moonbit_native_memcpy"
19
20///|
21pub extern "c" fn memmove(
22 dest : Ptr[Byte],
23 src : ConstPtr[Byte],
24 count : UInt64
25) = "moonbit_native_memmove"
26
27///|
28pub extern "c" fn memcmp(
29 a : ConstPtr[Byte],
30 b : ConstPtr[Byte],
31 count : UInt64
32) -> Int = "moonbit_native_memcmp"
33