IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2004, 2:54:59 PM (22 years ago)
Author:
desonia
Message:

Fixed Bug #63 -- TPOutOfMemory test fails with very large memory machines.

File:
1 edited

Legend:

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

    r1030 r1075  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-06-14 21:36:24 $
     8 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-06-24 00:54:59 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    149149int TPOutOfMemory(void)
    150150{
    151     int* mem1 = NULL;
    152     int* mem2 = NULL;
    153     int* mem3 = NULL;
    154     int* mem4 = NULL;
     151    int* mem[100];
    155152    psMemExhaustedCallback cb;
     153
     154    for (int lcv = 0; lcv<100; lcv++) {
     155        mem[lcv] = NULL;
     156    }
    156157
    157158    psLogMsg(__func__,PS_LOG_INFO,"Upon requesting more memory than is available, psalloc shall call "
     
    162163    cb = psMemExhaustedCallbackSet(TPOutOfMemoryExhaustedCallback);
    163164
    164     mem1 = (int*) psAlloc(UINT_MAX-1000);
     165    for (int lcv = 0; lcv<100; lcv++) {
     166        mem[lcv] = (int*) psAlloc(SIZE_MAX-1000);
     167    }
    165168
    166169    psMemExhaustedCallbackSet(cb);
     
    171174    }
    172175
    173     psFree(mem1);
    174     psFree(mem2);
    175     psFree(mem3);
    176     psFree(mem4);
     176    for (int lcv = 0; lcv<100; lcv++) {
     177        psFree(mem[lcv]);
     178    }
    177179
    178180    return 0;
Note: See TracChangeset for help on using the changeset viewer.