Changeset 1075 for trunk/psLib/test/sysUtils/tst_psMemory.c
- Timestamp:
- Jun 23, 2004, 2:54:59 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sysUtils/tst_psMemory.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/tst_psMemory.c
r1030 r1075 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.1 6$ $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 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 149 149 int TPOutOfMemory(void) 150 150 { 151 int* mem1 = NULL; 152 int* mem2 = NULL; 153 int* mem3 = NULL; 154 int* mem4 = NULL; 151 int* mem[100]; 155 152 psMemExhaustedCallback cb; 153 154 for (int lcv = 0; lcv<100; lcv++) { 155 mem[lcv] = NULL; 156 } 156 157 157 158 psLogMsg(__func__,PS_LOG_INFO,"Upon requesting more memory than is available, psalloc shall call " … … 162 163 cb = psMemExhaustedCallbackSet(TPOutOfMemoryExhaustedCallback); 163 164 164 mem1 = (int*) psAlloc(UINT_MAX-1000); 165 for (int lcv = 0; lcv<100; lcv++) { 166 mem[lcv] = (int*) psAlloc(SIZE_MAX-1000); 167 } 165 168 166 169 psMemExhaustedCallbackSet(cb); … … 171 174 } 172 175 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 } 177 179 178 180 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
