bug fix: Imanager should wait for Fetcher to stop
tmp: fix bug of realloc (which only allocate if there is free memory
next to the currently allocated one)
   + currently only work for linux
   + need to activate manually