Question about dataspace

Yuxin Ren ryx at
Tue May 13 14:56:54 CEST 2014

Thank you very much for your reply.
But I still have some questions.
Can I alloc and free memory without dataspace?

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?

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?

Thank you

On Sat, May 10, 2014 at 4:15 PM, Adam Lackorzynski <
adam at> wrote:

> Hi,
> On Sat May 10, 2014 at 11:23:47 +0800, Yuxin Ren wrote:
> > I cannot understand dataspace very well. I have some questions  about it.
> > Each time I want to alloc a piece of memory, I must create a dataspace
> > first?
> I think you mean that you need to allocate a capability before calling
> mem_alloc()->alloc()? Yes, you need to do that for each new memory to
> be allocated.
> > I look at the example code of memory allocation.
> > I found after create adataspace, we call
> > L4Re::Env::env<
> >()->mem_alloc()->alloc()
> > to alloca memory via dataspace.
> > Can I call this function multiple times on the same dataspace instance
> > without free? If so, what is its effect?
> No, don't do that. free the dataspace at mem_alloc() before allocating
> new memory on the same dataspace (capability).
> > In addtion we use attach to map the dataspace. Can I attach the same
> > dataspace multiple times without free?
> Yes, you can do that.
> > In this case, does it mean that the same physical memory is mapped into
> > different virtual address?
> Yes, exactly.
> Adam
> --
> Adam                 adam at
>   Lackorzynski
> _______________________________________________
> l4-hackers mailing list
> l4-hackers at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the l4-hackers mailing list