Commit Graph

5 Commits

Author SHA1 Message Date
Kartik Agaram 6a7eaa81ee 4883 - rudimentary memory allocator 2018-12-28 11:14:29 -08:00
Kartik Agaram 4aff81ec03 4769 2018-11-24 19:55:59 -08:00
Kartik Agaram 94ad882e82 4668 2018-10-05 21:30:22 -07:00
Kartik Agaram 630433cd9c 4614 - redo simulated RAM
Now simulated 'Memory' isn't just a single flat array. Instead it knows
about segments and VMAs.

The code segment will always be first, and the data/heap segment will always
be second. The brk() syscall knows about the data segment.

One nice side-effect is that I no longer need to mess with Memory initialization
regardless of where I place my segments.
2018-09-29 10:20:13 -07:00
Kartik Agaram 2b36eee9b1 4502 - support string literals directly in code
Doesn't de-duplicate in the data segment, though. If you use the literal
"foo" a hundred times in your code segment you're gonna spend a hundred
times the space you need to.

We can now simplify our test harness a bit in the factorial app, but we
still have to put in commandline args to compare with manually. We only
support length-prefixed strings, not null-terminated ones.
2018-09-22 22:17:09 -07:00