[prev] 5 [next]

Dynamic Allocation

SPIM doesn't provide malloc()/free() functions
  • but provides  syscall 9 to extend .data
  • before syscall, set $a0 to the number of bytes requested
  • after syscall, $v0 holds start address of allocated chunk
Note: we will not be using this feature in this course.