Question about dataspace

Adam Lackorzynski adam at os.inf.tu-dresden.de
Wed May 14 01:55:27 CEST 2014


On Tue May 13, 2014 at 20:56:54 +0800, Yuxin Ren wrote:
> Can I alloc and free memory without dataspace?

The quick answer is: no. The reason is that there need to be some
service (the allocator) which gives you the memory. And that allocator
would need to talk a different protocol. However, the L4Re ones use
dataspaces.

> I know we can do memory mapping over IPC, using L4::Ipc::Snd_fpage
> and L4::Ipc::Rcv_fpage.
> So after a client gets a piece of memory mapping in, how does it ummap that
> memory? Still use deattach or anyting else?

When handling the virtual memory space directly with fpages both
dataspaces and the region management are out of the game. You should
still reserve that area with L4Re::Rm::reserve_area to block the area
from use by the region management.
Unmapping can be done, for example, via
L4Re::Env::env()->task()->unmap().

> Does Fiasco manage memory in user level or kernel level? That is to say,
> attach and deattach function are just system call or normal
> IPC invoking some serve in the user level?

Fiasco just provides the mechanism to established mappings (page table
entries) to an address space (a task). Managing those mappings is up to
user-space. So, for example, the region management is completely
implemented in user-level.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list