Ignore:
Timestamp:
Feb 18, 2003, 7:48:55 PM (23 years ago)
Author:
sandervl
Message:

Cleaned up memory map code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/virtual.cpp

    r9546 r9824  
    1 /* $Id: virtual.cpp,v 1.49 2002-12-27 15:25:40 sandervl Exp $ */
     1/* $Id: virtual.cpp,v 1.50 2003-02-18 18:48:55 sandervl Exp $ */
    22
    33/*
     
    167167 Win32MemMap *map;
    168168 DWORD offset;
     169 BOOL ret;
    169170
    170171    if (!base)
     
    178179        return FALSE;
    179180    }
    180     return map->flushView(offset, cbFlush);
     181    ret = map->flushView(offset, cbFlush);
     182    map->Release();
     183    return ret;
    181184}
    182185
     
    196199)
    197200{
    198  Win32MemMap *map;
    199  Win32MemMapView *view;
    200 
    201  DWORD offset;
     201    Win32MemMap *map;
     202    BOOL  ret;
    202203
    203204    if (!addr)
     
    206207        return FALSE;
    207208    }
    208     map = Win32MemMapView::findMapByView((ULONG)addr, &offset, MEMMAP_ACCESS_READ, &view);
     209    map = Win32MemMapView::findMapByView((ULONG)addr);
    209210    if(map == NULL) {
    210211        SetLastError( ERROR_FILE_NOT_FOUND );
    211212        return FALSE;
    212213    }
    213     return map->unmapViewOfFile(view);
     214    ret = map->unmapViewOfFile(addr);
     215    map->Release();
     216    return ret;
    214217}
    215218
     
    350353            //TODO: We don't allow protection flag changes for mmaped files now
    351354            map->commitPage(offset, FALSE, nrpages);
     355            map->Release();
    352356            return lpvAddress;
    353357        }
Note: See TracChangeset for help on using the changeset viewer.