ext/iodine/fio.c
/** Clears any memory locks, in case of a system call to `fork`. */
Clears any memory locks, in case of a system call to `fork`.
Clears any memory locks in case of a system call to ` fork ` .
void fio_malloc_after_fork(void) {
  arena_last_used = NULL;
  if (!arenas) {
    return;
  }
  memory.lock = FIO_LOCK_INIT;
  memory.forked = 1;
  for (size_t i = 0; i < memory.cores; ++i) {
    arenas[i].lock = FIO_LOCK_INIT;
  }
}
void fio_malloc_after_fork ( void ) { arena_last_used = NULL ; if ( ! arenas ) { return ; } memory . lock = FIO_LOCK_INIT ; memory . forked = 1 ; for ( size_t i = 0 ; i < memory . cores ; ++ i ) { arenas [ i ] . lock = FIO_LOCK_INIT ; } }
Clears any memory locks, in case of a system call to `fork`.
Clears any memory locks in case of a system call to ` fork ` .