MEMLOCK
#define MEMLOCK (void)pthread_mutex_lock(&memlock)
#define MEMLOCK do { INSIST(memlock == 0); memlock = 1; } while (0)
#define MEMLOCK 8