Edited activate_task such that the stack uses the whole memory assigned by mem_alloc