IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 721


Ignore:
Timestamp:
May 18, 2004, 1:35:25 PM (22 years ago)
Author:
desonia
Message:

modified TPOutOfMemory to try to allocate HUGE memory segments more than once.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psMemory.c

    r717 r721  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-05-18 19:22:35 $
     8 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-05-18 23:35:25 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    160160{
    161161    int currentId = psMemGetId();
    162     int* mem;
     162    int* mem1 = NULL;
     163    int* mem2 = NULL;
     164    int* mem3 = NULL;
     165    int* mem4 = NULL;
    163166    psMemExhaustedCallback cb;
    164167
     
    170173    cb = psMemExhaustedCallbackSet(TPOutOfMemoryExhaustedCallback);
    171174
    172     mem = (int*) psAlloc(ULONG_MAX);
     175    mem1 = (int*) psAlloc(UINT_MAX);
     176    mem2 = (int*) psAlloc(UINT_MAX);
     177    mem3 = (int*) psAlloc(UINT_MAX);
     178    mem4 = (int*) psAlloc(UINT_MAX);
    173179
    174180    psMemExhaustedCallbackSet(cb);
     
    179185    }
    180186
    181     psFree(mem);
     187    psFree(mem1);
     188    psFree(mem2);
     189    psFree(mem3);
     190    psFree(mem4);
    182191
    183192    psMemCheckLeaks(currentId,NULL,NULL);
Note: See TracChangeset for help on using the changeset viewer.