rem: ClearSemaphore (&_MemorySem);
add: ClearSemaphore (_MemorySem);
context: mem_allocate (MEM_SIZE coreSize, MEM_FLAGS flags, MEM_PRIORITY priority,		MEM_USAGE usage){	szMemoryNode *node;	SetSemaphore (&_MemorySem);#ifdef MEM_DEBUG	CheckMemory();#endif	if ((node = freeListHead) == NULL)		Message ("mem_allocate: out of extents.");	else if ((node->memory = MallocWithRetry (coreSize, "mem_allocate:")) == 0			&& coreSize)		Message ("mem_allocate: couldn't allocate %u bytes.", coreSize);	else	{		freeListHead = node->next;		node->size = coreSize;		node->handle = node - extents + 1;		node->refcount = 0;		if (flags & MEM_ZEROINIT)				memset (node->memory, 0, node->size);#ifdef LEAK_DEBUGif (leak_debug)	printf ("alloc %d: %08x, %lu\n", (int) node->handle, (int) node->memory,					node->size);if (node->handle == leak_idx && node->size == leak_size)	node = node;if (node->size == leak_size)	node = node;#endif /* LEAK_DEBUG */		ClearSemaphore (&_MemorySem);		return (node->handle);	}	ClearSemaphore (&_MemorySem);	(void) priority;  /* Satisfying compiler (unused parameter) */	(void) usage;  /* Satisfying compiler (unused parameter) */	return (0);}