Changeset View
Changeset View
Standalone View
Standalone View
intern/guardedalloc/intern/mmap_win.c
| Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | #endif | ||||
| mm->maphandle = maphandle; | mm->maphandle = maphandle; | ||||
| mm->mmap = ptr; | mm->mmap = ptr; | ||||
| mmap_addtail(mmapbase, mm); | mmap_addtail(mmapbase, mm); | ||||
| return ptr; | return ptr; | ||||
| } | } | ||||
| /* munmap for windows */ | /* munmap for windows */ | ||||
| intptr_t munmap(void *ptr, size_t UNUSED(size)) | int munmap(void *ptr, size_t UNUSED(size)) | ||||
| { | { | ||||
| MemMap *mm = mmap_findlink(mmapbase, ptr); | MemMap *mm = mmap_findlink(mmapbase, ptr); | ||||
| if (!mm) { | if (!mm) { | ||||
| errno = EINVAL; | errno = EINVAL; | ||||
| return -1; | return -1; | ||||
| } | } | ||||
| UnmapViewOfFile(mm->mmap); | UnmapViewOfFile(mm->mmap); | ||||
| CloseHandle(mm->maphandle); | CloseHandle(mm->maphandle); | ||||
| ▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines | |||||