15 lines
348 B
TypeScript
Raw Normal View History

2019-04-18 11:51:07 +02:00
import "rt";
2019-04-16 17:33:33 +02:00
import { memory as builtin_memory } from "memory";
export namespace memory {
export function allocate(size: usize): usize {
2019-04-18 12:53:48 +02:00
return __rt_allocate(size, 0);
}
export function free(ptr: usize): void {
2019-04-18 12:53:48 +02:00
__rt_free(ptr);
}
2019-04-16 17:33:33 +02:00
export function fill(dst: usize, c: u8, n: usize): void {
builtin_memory.fill(dst, c, n);
}
}