Changeset 7414 for trunk/psLib/src/sys/psMemory.c
- Timestamp:
- Jun 7, 2006, 1:16:44 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psMemory.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psMemory.c
r7134 r7414 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.7 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 5-18 01:22:48$10 * @version $Revision: 1.72 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-06-07 23:16:44 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 61 61 static bool safeThreads = true; 62 62 63 // private boolean for deciding if allocated memory is persistent 64 static bool memory_is_persistent = false; 65 63 66 static psS32 recycleBins = 13; 64 67 static psS32 recycleBinSize[14] = { … … 330 333 } 331 334 335 /* 336 * Set whether allocated memory is persistent 337 */ 338 bool p_psMemAllocatePersistent(bool is_persistent) 339 { 340 const bool old = memory_is_persistent; 341 memory_is_persistent = is_persistent; 342 343 return old; 344 } 345 346 /* 347 * Actually allocate memory 348 */ 332 349 psPtr p_psAlloc(size_t size, 333 350 const char *file, … … 398 415 ptr->file = file; 399 416 ptr->freeFunc = NULL; 400 ptr->persistent = false;417 ptr->persistent = memory_is_persistent; 401 418 *(psU32 *)&ptr->lineno = lineno; 402 419 *(psPtr *)((int8_t *) (ptr + 1) + size) = P_PS_MEMMAGIC;
Note:
See TracChangeset
for help on using the changeset viewer.
