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/mmap.h

    r8913 r9824  
    1 /* $Id: mmap.h,v 1.24 2002-07-23 13:51:48 sandervl Exp $ */
     1/* $Id: mmap.h,v 1.25 2003-02-18 18:48:55 sandervl Exp $ */
    22
    33/*
     
    2626
    2727//commit 4 pages at once when the app accesses it
    28 #define NRPAGES_TOCOMMIT    16
     28#define NRPAGES_TOCOMMIT        16
    2929
    30 #define MEMMAP_ACCESS_READ  1
    31 #define MEMMAP_ACCESS_WRITE 2
     30#define MEMMAP_ACCESS_READ      1
     31#define MEMMAP_ACCESS_WRITE     2
    3232#define MEMMAP_ACCESS_EXECUTE   4
    3333
     
    4848   BOOL   flushView(ULONG offset, ULONG cbFlush);
    4949   LPVOID mapViewOfFile(ULONG size, ULONG offset, ULONG fdwAccess);
    50    BOOL   unmapViewOfFile(Win32MemMapView *view);
     50   BOOL   unmapViewOfFile(LPVOID addr);
    5151
    5252   HFILE  getFileHandle()                { return hMemFile; };
    5353   LPSTR  getMemName()                   { return lpszMapName; };
    5454   DWORD  getProtFlags()                 { return mProtFlags; };
     55   BOOL   setProtFlags(DWORD dwNewProtect);
    5556   LPVOID getMappingAddr()               { return pMapping; };
    5657   DWORD  getProcessId()                 { return mProcessId;};
     
    6566
    6667static Win32MemMap *findMap(LPSTR lpszName);
     68static Win32MemMap *findMapByFile(HANDLE hFile);
    6769static Win32MemMap *findMap(ULONG address);
    6870
     
    9294protected:
    9395   HFILE  hMemFile;
     96   HFILE  hOrgMemFile;
    9497   ULONG  mSize;
    9598   ULONG  mProtFlags;
     
    131134
    132135static void             deleteViews(Win32MemMap *map);
    133 static Win32MemMap     *findMapByView(ULONG address, ULONG *offset, ULONG accessType, Win32MemMapView **pView=NULL);
    134 static Win32MemMapView *findView(LPVOID address);
     136static Win32MemMap     *findMapByView(ULONG address, ULONG *offset = NULL,
     137                                      ULONG accessType = MEMMAP_ACCESS_READ);
     138static Win32MemMapView *findView(ULONG address);
    135139
    136140#ifdef __DEBUG_ALLOC__
Note: See TracChangeset for help on using the changeset viewer.