Mercurial > lcfOS
comparison kernel/memory.c3 @ 301:6753763d3bec
merge codegen into ppci package
author | Windel Bouwman |
---|---|
date | Thu, 05 Dec 2013 17:02:38 +0100 |
parents | 9417caea2eb3 |
children |
comparison
equal
deleted
inserted
replaced
300:158068af716c | 301:6753763d3bec |
---|---|
1 module memory; | 1 module memory; |
2 | 2 |
3 import process; | 3 import process; |
4 | 4 |
5 var u8* ptr; | 5 var int ptr; |
6 | 6 |
7 function u8* Alloc(int size) | 7 function u8* Alloc(int size) |
8 { | 8 { |
9 ptr = ptr + size; | 9 ptr = ptr + size; |
10 return ptr; | 10 return cast<u8*>(ptr); |
11 } | 11 } |
12 | 12 |
13 | 13 |