0806学习日志

操作系统-three easy pieces

Memory API

  1. void * malloc(size_t size)

  2. void free(void* ptr)

Common Errors

  1. Forgetting To Allocate Memory
  2. Not Allocating Enough Memory
  3. Forgetting To Initializing Memory
  4. Forgetting To Free Memory
  5. Freeing Memory Before You Are Done With It
  6. Freeing Memory Repeatedly
  7. Calling free() Incorrectly

Other Call

  1. calloc()
  2. realloc()

Address Translation

  1. hardware-based address translation: Base and bound

mechanism