allocate

Allocated given bytes and return a pointer to the memory. Do not forget to free the memory after using it.

int allocate(int bytes)

ptr = g_memory.allocate(4)
g_memory.write_int(ptr, 1337)
g_memory.free(ptr)

Last updated