Mercurial > lcfOS
annotate kernel/src/memory.c3 @ 389:2ec730e45ea1
Added check for recursive struct
author | Windel Bouwman |
---|---|
date | Fri, 16 May 2014 12:29:31 +0200 |
parents | 6df89163e114 |
children | 6ae782a085e0 |
rev | line source |
---|---|
283 | 1 module memory; |
293 | 2 |
377 | 3 import arch; |
381 | 4 import io; |
283 | 5 |
301 | 6 var int ptr; |
283 | 7 |
367 | 8 function void init() |
9 { | |
381 | 10 ptr = 0; |
389 | 11 // io.print2("ptr = ", ptr); |
367 | 12 // TODO |
13 } | |
14 | |
296 | 15 function u8* Alloc(int size) |
283 | 16 { |
296 | 17 ptr = ptr + size; |
301 | 18 return cast<u8*>(ptr); |
283 | 19 } |
20 | |
21 |