sys_mem.h 522 B

1234567891011121314151617
  1. /* Per-process anonymous heap (SYS_MEM_ALLOC/GROW/FREE).
  2. *
  3. * Ring-3 commands only have a 2 MB image/stack window, which is not enough
  4. * for a full-frame image. This service maps a single growable arena at
  5. * USER_HEAP_BASE into the caller's page directory. The reaper frees it with
  6. * the rest of the process. */
  7. #ifndef SYS_MEM_H
  8. #define SYS_MEM_H
  9. struct process;
  10. int sys_mem_alloc(unsigned int bytes);
  11. int sys_mem_grow(unsigned int bytes);
  12. int sys_mem_free(void);
  13. void sys_mem_release(struct process *p);
  14. #endif