Ejemplo n.º 1
0
 // Allocate a page of memory in the process address space.
 rose_addr_t allocate_page(rose_addr_t hint=0) {
     RSIM_Process *proc = thread->get_process();
     rose_addr_t addr = proc->mem_map(hint, 4096, MemoryMap::MM_PROT_RW, MAP_ANONYMOUS, 0, -1);
     assert((int64_t)addr>=0 || (int64_t)addr<-256); // disallow error numbers
     return addr;
 }