elysium/stdlib/alloc.ely

23 lines
288 B
Plaintext
Raw Permalink Normal View History

module alloc;
u64 alloc(u64 size) {
return 0u64;
}
void free(u64 address) {
}
u64 growMemory(u64 numPages) {
i64 value = __builtin_memory_grow(numPages);
if(value == -1) {
return 0u64;
}
return __builtin_memory_size();
}
u64 memorySize() {
return __builtin_memory_size();
}