Changeset 8759 for trunk/src


Ignore:
Timestamp:
Jun 25, 2002, 9:15:04 AM (23 years ago)
Author:
sandervl
Message:

KSO: Reserve low 32MB of address space before initializing the CRT IF we compile with the debug heap (kLib).

Location:
trunk/src/odincrt
Files:
2 edited

Legend:

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

    r5472 r8759  
    6868   switch (ulFlag) {
    6969      case 0 :
    70 
     70         {
     71         #ifdef WITH_KLIB
     72         /*
     73          * We need to reserve memory for the executable image
     74          * before initiating any heaps. Lets do reserve 32MBs
     75          */
     76         PVOID pvReserved = NULL;
     77         DosAllocMem(&pvReserved, 32*1024*1024, PAG_READ);
     78         #endif
    7179         /*******************************************************************/
    7280         /* The C run-time environment initialization function must be      */
     
    99107            pPIB->pib_ultype = 3;
    100108         #endif
     109
     110         #ifdef WITH_KLIB
     111         /* cleanup - hacking is done */
     112         DosFreeMem(pvReserved);
     113         #endif
    101114         break;
     115         }
    102116      case 1 :
    103117         break;
  • trunk/src/odincrt/makefile

    r8324 r8759  
    1 # $Id: makefile,v 1.28 2002-04-29 14:45:43 bird Exp $
     1# $Id: makefile,v 1.29 2002-06-25 07:15:04 sandervl Exp $
    22
    33#
     
    2424CXXFLAGS    = $(CXXFLAGS_ODINCRT)
    2525LD2FLAGS    = $(LD2FLAGS_ODINCRT)
     26!ifdef WITH_KLIB
     27CDEFINES    = $(CDEFINES_ODINCRT) -DWITH_KLIB
     28!else
    2629CDEFINES    = $(CDEFINES_ODINCRT)
     30!endif
    2731IMPLIBFLAGS = $(IMPLIBFLAGS) /NOIgnoreCase
    2832
Note: See TracChangeset for help on using the changeset viewer.