diff options
-rw-r--r-- | subx/010---vm.cc | 11 | ||||
-rw-r--r-- | subx/020syscalls.cc | 4 |
2 files changed, 0 insertions, 15 deletions
diff --git a/subx/010---vm.cc b/subx/010---vm.cc index 82a7d2f5..52b6b597 100644 --- a/subx/010---vm.cc +++ b/subx/010---vm.cc @@ -156,17 +156,6 @@ void sanity_check(uint32_t start, uint32_t end) { // RAM is made of VMAs. vector<vma> Mem; :(code) -// The first 3 VMAs are special. When loading ELF binaries in later layers, -// we'll assume that the first VMA is for code, the second is for data -// (including the heap), and the third for the stack. -void grow_code_segment(uint32_t new_end_address) { - assert(!Mem.empty()); - Mem.at(0).grow_until(new_end_address); -} -void grow_data_segment(uint32_t new_end_address) { - assert(SIZE(Mem) > 1); - Mem.at(1).grow_until(new_end_address); -} :(before "End Globals") uint32_t End_of_program = 0; // when the program executes past this address in tests we'll stop the test // The stack grows downward. Can't increase its size for now. diff --git a/subx/020syscalls.cc b/subx/020syscalls.cc index f885089e..16495411 100644 --- a/subx/020syscalls.cc +++ b/subx/020syscalls.cc @@ -72,10 +72,6 @@ void process_int80() { trace(Callstack_depth+1, "run") << "result: " << Reg[EAX].i << end(); if (Reg[EAX].i == -1) raise << "rename: " << strerror(errno) << '\n' << end(); break; - case 45: // brk: modify size of data segment - trace(Callstack_depth+1, "run") << "grow data segment to " << Reg[EBX].u << end(); - grow_data_segment(/*new end address*/Reg[EBX].u); - break; case 90: // mmap: allocate memory outside existing segment allocations trace(Callstack_depth+1, "run") << "mmap: allocate new segment" << end(); // Ignore most arguments for now: address hint, protection flags, sharing flags, fd, offset. |