rem: _MemorySem = CreateSemaphore (1);
add: _MemorySem = CreateSemaphore (1, "Memory");
context: mem_init (void){	int i;	_MemorySem = CreateSemaphore (1);	SetSemaphore (_MemorySem);	freeListHead = &extents[0];	for (i=0; i<MAX_EXTENTS; i++)	{		extents[i].memory = NULL;		extents[i].handle = -1;		extents[i].next = &extents[i+1];		extents[i].size = 0;	}	extents[MAX_EXTENTS-1].next = NULL;	ClearSemaphore (_MemorySem);	return TRUE;}