temporarily fix from Johnny Matthews committed, win32 doesn't have munmap. Someone can worry about a future mmap-like implementation.

This commit is contained in:
Erwin Coumans 2006-02-17 20:18:49 +00:00
parent 69d00bccaa
commit 78942aa843

@ -388,12 +388,18 @@ static void rem_memblock(MemHead *memh)
{
remlink(membase,&memh->next);
if (memh->prev){
if (memh->next) MEMNEXT(memh->prev)->nextname = MEMNEXT(memh->next)->name;
if (memh->next) MEMNEXT(memh->prev)->nextname =
MEMNEXT(memh->next)->name;
else MEMNEXT(memh->prev)->nextname = 0;
}
totblock--;
mem_in_use -= memh->len;
#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
free(memh);
#else
if(memh->mmap) {
mmap_in_use -= memh->len;
if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail)))
@ -401,6 +407,7 @@ static void rem_memblock(MemHead *memh)
}
else
free(memh);
#endif
}
static void MemorY_ErroR(const char *block, const char *error)