Changeset 1432 for trunk/src/kernel32/mmap.h
- Timestamp:
- Oct 25, 1999, 12:53:25 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/mmap.h
r712 r1432 1 /* $Id: mmap.h,v 1. 9 1999-08-27 16:51:00sandervl Exp $ */1 /* $Id: mmap.h,v 1.10 1999-10-24 22:51:22 sandervl Exp $ */ 2 2 3 3 /* … … 14 14 15 15 #include <vmutex.h> 16 #include "heapshared.h" 16 17 17 18 #ifndef PAGE_SIZE … … 45 46 DWORD getProtFlags() { return mProtFlags; }; 46 47 LPVOID getMappingAddr() { return pMapping; }; 48 DWORD getProcessId() { return mProcessId;}; 47 49 48 50 void AddRef() { ++referenced; }; … … 57 59 static void deleteAll(); 58 60 61 #ifdef __DEBUG_ALLOC__ 62 void *operator new(size_t size, const char *filename, size_t lineno) 63 { 64 return _umalloc(sharedHeap, size); 65 } 66 void operator delete(void *location, const char *filename, size_t lineno) 67 { 68 free(location); 69 } 70 #else 71 void *operator new(size_t size) 72 { 73 return _umalloc(sharedHeap, size); 74 } 75 void operator delete(void *location) 76 { 77 free(location); 78 } 79 #endif 80 59 81 protected: 60 82 HFILE hMemMap, hMemFile; 61 83 ULONG mSize; 62 84 ULONG mProtFlags; 85 ULONG mProcessId; 63 86 ULONG mMapAccess; 64 87 LPSTR lpszMapName; … … 92 115 93 116 Win32MemMap *getParentMap() { return mParentMap;}; 117 DWORD getProcessId() { return mProcessId;}; 94 118 95 static void deleteView (Win32MemMap *map);119 static void deleteViews(Win32MemMap *map); 96 120 static Win32MemMap *findMapByView(ULONG address, ULONG *offset, ULONG accessType, Win32MemMapView **pView=NULL); 97 121 static Win32MemMapView *findView(LPVOID address); 98 122 123 #ifdef __DEBUG_ALLOC__ 124 void *operator new(size_t size, const char *filename, size_t lineno) 125 { 126 return _umalloc(sharedHeap, size); 127 } 128 void operator delete(void *location, const char *filename, size_t lineno) 129 { 130 free(location); 131 } 132 #else 133 void *operator new(size_t size) 134 { 135 return _umalloc(sharedHeap, size); 136 } 137 void operator delete(void *location) 138 { 139 free(location); 140 } 141 #endif 142 99 143 protected: 100 144 ULONG mSize, errorState; 145 ULONG mProcessId; 101 146 ULONG mfAccess, mOffset; 102 147 void *pMapView;
Note:
See TracChangeset
for help on using the changeset viewer.