Ignore:
Timestamp:
Nov 18, 1999, 10:20:09 AM (26 years ago)
Author:
bird
Message:

Added ulMaxAddr - user address space end address. (valid addresses are
below this address.)

File:
1 edited

Legend:

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

    r1713 r1768  
    1 /* $Id: initterm.cpp,v 1.24 1999-11-12 14:57:15 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.25 1999-11-18 09:20:08 bird Exp $ */
    22
    33/*
     
    6666
    6767/* Tue 03.03.1998: knut */
    68 /* flag to optimize DosAllocMem to use all the memory on SMP machines */
    69 ULONG flAllocMem = 0;
     68ULONG flAllocMem = 0;    /* flag to optimize DosAllocMem to use all the memory on SMP machines */
     69ULONG ulMaxAddr = 0x20000000; /* end of user address space. */
    7070int   loadNr = 0;
    7171char  kernel32Path[CCHMAXPATH] = "";
     
    8484    size_t i;
    8585    APIRET rc;
    86     ULONG sysinfo;
     86    ULONG  ulSysinfo;
    8787
    8888    /*-------------------------------------------------------------------------*/
     
    123123
    124124            /* knut: check for high memory support */
    125             rc = DosQuerySysInfo(QSV_VIRTUALADDRESSLIMIT, QSV_VIRTUALADDRESSLIMIT, &sysinfo, sizeof(sysinfo));
    126 
    127             if ( rc == 0 && sysinfo > 512 )   //VirtualAddresslimit is in MB
    128                    flAllocMem = PAG_ANY;      // high memory support. Let's use it!
    129             else   flAllocMem = 0;        // no high memory support
     125            rc = DosQuerySysInfo(QSV_VIRTUALADDRESSLIMIT, QSV_VIRTUALADDRESSLIMIT, &ulSysinfo, sizeof(ulSysinfo));
     126            if (rc == 0 && ulSysinfo > 512)   //VirtualAddresslimit is in MB
     127            {
     128                flAllocMem = PAG_ANY;      // high memory support. Let's use it!
     129                ulMaxAddr = ulSysinfo * (1024*1024);
     130            }
     131            else
     132                flAllocMem = 0;        // no high memory support
    130133
    131134            InitializeTIB(TRUE);
Note: See TracChangeset for help on using the changeset viewer.