Ignore:
Timestamp:
May 20, 2002, 3:47:59 PM (23 years ago)
Author:
sandervl
Message:

DF: Removed 64 MB memory mapped file limit & Fix for opening memory mapped file with size larger than the file size

File:
1 edited

Legend:

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

    r8119 r8456  
    1 /* $Id: hmmmap.cpp,v 1.19 2002-03-24 11:59:45 sandervl Exp $ */
     1/* $Id: hmmmap.cpp,v 1.20 2002-05-20 13:47:58 sandervl Exp $ */
    22
    33/*
     
    5151//******************************************************************************
    5252DWORD HMDeviceMemMapClass::CreateFileMapping(PHMHANDLEDATA         pHMHandleData,
    53                                              HFILE hFile, 
     53                                             HFILE hFile,
    5454                                             SECURITY_ATTRIBUTES *sa, /* [in] Optional security attributes*/
    5555                                             DWORD protect,   /* [in] Protection for mapping object */
    5656                                             DWORD size_high, /* [in] High-order 32 bits of object size */
    5757                                             DWORD size_low,  /* [in] Low-order 32 bits of object size */
    58                                              LPCSTR name)     /* [in] Name of file-mapping object */ 
     58                                             LPCSTR name)     /* [in] Name of file-mapping object */
    5959{
    6060 Win32MemMap *map;
     
    6464     (protect & (PAGE_READONLY|PAGE_READWRITE|PAGE_WRITECOPY)) == 0 ||
    6565//     (hFile == -1 && (protect & SEC_COMMIT)) ||
    66      ((protect & SEC_COMMIT) && (protect & SEC_RESERVE))) 
     66     ((protect & SEC_COMMIT) && (protect & SEC_RESERVE)))
    6767  {
    6868
     
    109109                dprintf(("CreateFileMappingA: can't create Win32MemMap object!"));
    110110                return ERROR_OUTOFMEMORY;
    111         } 
    112 
    113         if(map->Init() == FALSE) {
     111        }
     112
     113        if(map->Init(size_low) == FALSE) {
    114114                dprintf(("CreateFileMappingA: init failed!"));
    115115                delete map;
     
    177177           dwFileOffsetHigh,
    178178           dwFileOffsetLow,
    179            dwNumberOfBytesToMap, 
     179           dwNumberOfBytesToMap,
    180180           lpBaseAddress));
    181181
    182   if(lpBaseAddress != NULL) 
     182  if(lpBaseAddress != NULL)
    183183  {
    184184#if 0
Note: See TracChangeset for help on using the changeset viewer.