Implemented additional checking in the execute() method of the brk syscall, defined in the BrkSyscall class, to ensure that memory allocation does not overflow stack space. The System Call has as its argument the new "program break", which is now compared with the current "stack pointer" before being set to avoid overlaps.
This commit resolves a @todo present in the code.
Implemented additional checking in the
execute()
method of the brk syscall, defined in theBrkSyscall
class, to ensure that memory allocation does not overflow stack space. The System Call has as its argument the new "program break", which is now compared with the current "stack pointer" before being set to avoid overlaps. This commit resolves a @todo present in the code.