Changeset 1075 for trunk/psLib/test/sysUtils
- Timestamp:
- Jun 23, 2004, 2:54:59 PM (22 years ago)
- Location:
- trunk/psLib/test/sysUtils
- Files:
-
- 2 edited
-
tst_psMemory.c (modified) (4 diffs)
-
verified/tst_psMemory.stderr (modified) (2 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; -
trunk/psLib/test/sysUtils/verified/tst_psMemory.stderr
r1073 r1075 17 17 <DATE> <TIME> <HOST> |I| TPOutOfMemory|Upon requesting more memory than is available, psalloc shall call the psMemExhaustedCallback. 18 18 <DATE> <TIME> <HOST> |I|TPOutOfMemoryEx|Custom MemExhaustedCallback was invoked. 19 <DATE> <TIME> <HOST> |A| p_psAlloc|Failed to allocate 4294966295 bytes at tst_psMemory.c:16 419 <DATE> <TIME> <HOST> |A| p_psAlloc|Failed to allocate 4294966295 bytes at tst_psMemory.c:166 20 20 21 21 ---> TESTPOINT PASSED (psMemory{450-TPOutOfMemory} | tst_psMemory.c) … … 59 59 <DATE> <TIME> <HOST> |I| TPcheckLeaks|following psMemCheckLeaks call should produce one instance. 60 60 file:line ID 61 tst_psMemory.c:31 4161 tst_psMemory.c:316 1 62 62 <DATE> <TIME> <HOST> |I| TPcheckLeaks|Testing psMemCheckLeaks again with a different leak location 63 63 <DATE> <TIME> <HOST> |I| TPcheckLeaks|following psMemCheckLeaks call should produce one error. 64 64 file:line ID 65 tst_psMemory.c:34 41165 tst_psMemory.c:346 11 66 66 <DATE> <TIME> <HOST> |I| TPcheckLeaks|Testing psMemCheckLeaks again with multiple leak locations. 67 67 <DATE> <TIME> <HOST> |I| TPcheckLeaks|following psMemCheckLeaks call should produce two errors. 68 68 file:line ID 69 tst_psMemory.c:37 21670 tst_psMemory.c:37 21469 tst_psMemory.c:374 16 70 tst_psMemory.c:374 14 71 71 72 72 ---> TESTPOINT PASSED (psMemory{454-TPcheckLeaks} | tst_psMemory.c)
Note:
See TracChangeset
for help on using the changeset viewer.
