summaryrefslogtreecommitdiff
path: root/sim/process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/process.cc')
-rw-r--r--sim/process.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sim/process.cc b/sim/process.cc
index ac2aae5d4..bb13bd35f 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -331,7 +331,8 @@ LiveProcess::startup()
stack_min &= ~7;
stack_size = stack_base - stack_min;
// map memory
- pTable->allocate(stack_min, stack_size);
+ pTable->allocate(roundDown(stack_min, VMPageSize),
+ roundUp(stack_size, VMPageSize));
// map out initial stack contents
Addr argv_array_base = stack_min + sizeof(uint64_t); // room for argc
@@ -396,8 +397,6 @@ LiveProcess::create(const string &nm, System *system,
fatal("Unknown object file architecture.");
}
- delete objFile;
-
if (process == NULL)
fatal("Unknown error creating process object.");