Move a watcher to a different memory location?

Marc Lehmann schmorp at
Sun Nov 17 12:50:20 CET 2013

On Sun, Nov 17, 2013 at 07:12:12PM +0800, Åke Kullenberg <ake.kullenberg at> wrote:
> want to move the watcher to another place on the heap. I would assume
> libev's internal data structures don't allow for this while the watcher is
> started, but how about when it's stopped? Is this assumption correct? If
> not, how can it be done?

Ok, after discussing this, we concluded that we won't officially allow
it at this time - while it would work with the current code, we don't
consider the use case (copying memory blocks with watchers in them) big
enough to outweigh the commitment this would put on future versions.

This means that currently, you have to "copy" the watchers by calling
ev_TYPE_init on the new watcher structure.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list