about summary refs log tree commit diff stats
path: root/subx/020syscalls.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-05-18 01:02:22 -0700
committerKartik Agaram <vc@akkartik.com>2019-05-18 01:02:22 -0700
commit44fdc79f496281d4e0f99539c16a88de02b16d5b (patch)
treeec228c29e80665cecc44f8dd7bce71d40b7bf906 /subx/020syscalls.cc
parentab16d49bdc55d64ba27f2ef5fe6811669b9d5c1f (diff)
downloadmu-44fdc79f496281d4e0f99539c16a88de02b16d5b.tar.gz
5188
Clean up some unused constants.
Diffstat (limited to 'subx/020syscalls.cc')
-rw-r--r--subx/020syscalls.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/subx/020syscalls.cc b/subx/020syscalls.cc
index eb8ebcce..eb72f85d 100644
--- a/subx/020syscalls.cc
+++ b/subx/020syscalls.cc
@@ -112,15 +112,14 @@ void check_mode(int reg) {
 :(before "End Globals")
 // Very primitive/fixed/insecure mmap segments for now.
 uint32_t Segments_allocated_above = END_HEAP;
-const uint32_t SPACE_FOR_SEGMENT = 0x01000000;
 :(code)
 // always allocate multiples of the segment size
 uint32_t new_segment(uint32_t length) {
   assert(length > 0);
-  uint32_t result = (Segments_allocated_above - length) & 0xff000000;
+  uint32_t result = (Segments_allocated_above - length) & 0xff000000;  // same number of zeroes as SEGMENT_ALIGNMENT
   if (result <= START_HEAP) {
     raise << "Allocated too many segments; the VM ran out of memory. "
-          << "Maybe SPACE_FOR_SEGMENT can be smaller?\n" << end();
+          << "Maybe SEGMENT_ALIGNMENT can be smaller?\n" << end();
     exit(1);
   }
   Mem.push_back(vma(result, result+length));