plsm-ts/examples/heap.plsm
2025-03-18 19:49:59 +01:00

33 lines
330 B
Plaintext

module std/heap;
pub fun alloc(size: u64) i32 {
ret 10;
}
/*
fun alloc(size: u64) {
// TODO
}
fun new(_struct: Struct) {
// TODO
}
*/
/*
fun memset(addr: &u8, count: u64, value: u8) {
let i = 0;
while (i < count) {
addr[i] = value;
i += 1;
}
}
struct Array<T> {
ptr: &T;
([])(index: u64) {
}
}
*/