Re: [Fiasco.OC] Desctruction of objects created by factory

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Hi,

On Wed Mar 27, 2013 at 15:38:56 +0400, Sergey Grekhov wrote:
> Hello, L4 hackers!
> I have a question about Fiasco.OC.
> I am a bit stuck in understanding of how objects created by factory are destroyed? For example, we have a call from user space l4_factory_create_thread(). It creates object in Fiasco (file fiasco/src/kernel/factory.cpp) and map it using call map() from fiasco/src/kernel/map_util.cpp. However, the procedure of destruction of created objects (tasks, threads, gates, irqs, vms) is not clear: it seems that there is some kind of the "garbage collector", but I can not figure out some important things. Particularly:
> 1) where is the code which essentially destroys created objects (call destructors)?
> 2) what conditions make "garbage collection" to start?
> 3) how "garbage collection" can be forced from user-space?

Objects will be destroyed when their last mapping disappears in any
task, aka when they're unmapped. See for a 'delete' operation in
map_util.cpp for where they're destroyed.



Adam
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.