Ignore:
Timestamp:
Jul 15, 2002, 2:44:27 PM (23 years ago)
Author:
sandervl
Message:

dynamically allocate GDI handle array; no need to waste shared memory for local data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/objhandle.cpp

    r8871 r8875  
    1 /* $Id: objhandle.cpp,v 1.22 2002-07-15 10:02:29 sandervl Exp $ */
     1/* $Id: objhandle.cpp,v 1.23 2002-07-15 12:44:27 sandervl Exp $ */
    22/*
    33 * Win32 Handle Management Code for OS/2
     
    4444} GdiObject;
    4545
    46 static GdiObject objHandleTable[MAX_OBJECT_HANDLES] = {0};
    47 static ULONG     lowestFreeIndex = 1;
    48 static VMutex    objTableMutex;
     46static GdiObject *objHandleTable  = NULL;
     47static ULONG      lowestFreeIndex = 1;
     48static VMutex     objTableMutex;
    4949
    5050//******************************************************************************
     
    5353{
    5454    objTableMutex.enter();
     55    if(objHandleTable == NULL) {
     56        objHandleTable = (GdiObject *)malloc(MAX_OBJECT_HANDLES*sizeof(GdiObject));
     57        if(objHandleTable == NULL) {
     58            DebugInt3();
     59        }
     60    }
     61
    5562    if(lowestFreeIndex == -1) {
    5663        //oops, out of handles
Note: See TracChangeset for help on using the changeset viewer.