Changeset 876
- Timestamp:
- Jun 4, 2004, 1:46:48 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
sys/psMemory.c (modified) (2 diffs)
-
sys/psMemory.h (modified) (3 diffs)
-
sysUtils/psMemory.c (modified) (2 diffs)
-
sysUtils/psMemory.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psMemory.c
r850 r876 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-06-04 02:17:32$10 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-06-04 23:46:48 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 507 507 } 508 508 509 void p_psCustomFree(psFreeFcn fcn, void* ptr) 510 { 511 512 if (fcn == NULL) { 513 return; 514 } else { 515 if (fcn == PS_FREE) { 516 psFree(ptr); 517 } else { 518 fcn(ptr); 519 } 520 } 521 } -
trunk/psLib/src/sys/psMemory.h
r830 r876 12 12 * @author Robert Lupton, Princeton University 13 13 * 14 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-06-0 2 20:03:22$14 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-06-04 23:46:48 $ 16 16 * 17 17 * @ingroup SystemGroup System Utilities … … 113 113 ); 114 114 115 typedef void (*psFreeFcn)(void* ptr); 116 115 117 /** Memory allocation. This operates much like malloc(), but is guaranteed to return a non-NULL value. 116 118 * … … 277 279 ); 278 280 281 #define PS_FREE (void*)1 282 283 void p_psCustomFree(psFreeFcn fcn,void* ptr); 284 279 285 //@} End of Memory Management Functions 280 286 -
trunk/psLib/src/sysUtils/psMemory.c
r850 r876 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-06-04 02:17:32$10 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-06-04 23:46:48 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 507 507 } 508 508 509 void p_psCustomFree(psFreeFcn fcn, void* ptr) 510 { 511 512 if (fcn == NULL) { 513 return; 514 } else { 515 if (fcn == PS_FREE) { 516 psFree(ptr); 517 } else { 518 fcn(ptr); 519 } 520 } 521 } -
trunk/psLib/src/sysUtils/psMemory.h
r830 r876 12 12 * @author Robert Lupton, Princeton University 13 13 * 14 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-06-0 2 20:03:22$14 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-06-04 23:46:48 $ 16 16 * 17 17 * @ingroup SystemGroup System Utilities … … 113 113 ); 114 114 115 typedef void (*psFreeFcn)(void* ptr); 116 115 117 /** Memory allocation. This operates much like malloc(), but is guaranteed to return a non-NULL value. 116 118 * … … 277 279 ); 278 280 281 #define PS_FREE (void*)1 282 283 void p_psCustomFree(psFreeFcn fcn,void* ptr); 284 279 285 //@} End of Memory Management Functions 280 286
Note:
See TracChangeset
for help on using the changeset viewer.
