Changeset 2703 for trunk/psLib/test/sysUtils/tst_psMemory.c
- Timestamp:
- Dec 13, 2004, 10:49:56 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sysUtils/tst_psMemory.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/tst_psMemory.c
r2561 r2703 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12- 01 00:55:34$8 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-13 20:49:56 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 46 46 47 47 testDescription tests[] = { 48 { 49 TPCheckBufferPositive, 449, "checkBufferPositive", 0, false 50 }, 51 { 52 TPOutOfMemory, 450, "outOfMemory", -6, false 53 }, 54 { 55 TPReallocOutOfMemory, 562, "reallocOutOfMemory", -6, false 56 }, 57 { 58 TPrealloc, 451, "psRealloc", 0, false 59 }, 60 { 61 TPallocCallback, 452, "allocCallback", 0, false 62 }, 63 { 64 TPallocCallback, 453, "allocCallback2", 0, true 65 }, 66 { 67 TPcheckLeaks, 454, "checkLeaks", 0, false 68 }, 69 { 70 TPmemCorruption, 455, "psMemCorruption", 0, false 71 }, 72 { 73 TPFreeReferencedMemory, 456, "freeReferencedMemory", 0, false 74 }, 75 { 76 TPmultipleFree, 699, "multipleFree", 0, false 77 }, 78 { 79 NULL 80 } 48 {TPCheckBufferPositive, 449, "checkBufferPositive", 0, false}, 49 {TPOutOfMemory, 450, "outOfMemory", -6, false}, 50 {TPReallocOutOfMemory, 562, "reallocOutOfMemory", -6, false}, 51 {TPrealloc, 451, "psRealloc", 0, false}, 52 {TPallocCallback, 452, "allocCallback", 0, false}, 53 {TPallocCallback, 453, "allocCallback2", 0, true}, 54 {TPcheckLeaks, 454, "checkLeaks", 0, false}, 55 {TPmemCorruption, 455, "psMemCorruption", 0, false}, 56 {TPFreeReferencedMemory, 456, "freeReferencedMemory", 0, false}, 57 {TPmultipleFree, 699, "multipleFree", -6, false}, 58 {NULL} 81 59 }; 82 60 83 psS32 main( psS32 argc, char* argv[])61 psS32 main(psS32 argc, char* argv[]) 84 62 { 85 63 psLogSetLevel( PS_LOG_INFO ); … … 550 528 psFree( buffer ); 551 529 552 psLogMsg( __func__, PS_LOG_INFO, "Next should be an error aboutmultiple freeing." );530 psLogMsg( __func__, PS_LOG_INFO, "Next should abort due to multiple freeing." ); 553 531 psFree( buffer ); 554 532 555 psErr* err = (psErr*)psErrorLast(); 556 557 if (err->code != PS_ERR_MEMORY_DEREF_USAGE) { 558 psError(PS_ERR_UNKNOWN,true, 559 "Multiple psFree calls generated wrong error code (%d)", 560 err->code); 561 psFree(err); 562 return 1; 563 } 564 565 psFree(err); 566 567 return 0; 568 } 533 psError(PS_ERR_UNKNOWN,true, 534 "Multiple psFree call survived"); 535 536 return 0; 537 }
Note:
See TracChangeset
for help on using the changeset viewer.
