[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: camlSys__entry vs. FreeBSD kmod

On Wed, Jul 11, 2012 at 05:03:17PM +0100, Anil Madhavapeddy wrote:
> can the unload function call a cleanup function?

Sure, every kernel module has an event handler function, so it can run code on
various actions, including unloading the module.

> It would be nice to be able cancel outstanding Lwt threads, and do a
> Gc.compact to free any external resources that have been locked.


> Finally, we need to track all the memory allocated for the OCaml runtime and
> release that en-masse.  Can FreeBSD release all memory allocated to a 
> particular
> pool?

I do not know (perhaps Robert does), but one has to specify for the kernel-level
malloc() a "memory type" -- so, in theory, the kernel may track memory allocated
for different types.  (Probably that is how it spots leaked memory and emits a
warning on that.)  I will look it up.



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.