IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3585


Ignore:
Timestamp:
Mar 30, 2005, 4:32:20 PM (21 years ago)
Author:
desonia
Message:

found that data blocks less than the minimum recycle size can not be
handled well, so I made that value the minimum size allocatable.

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psMemory.c

    r3264 r3585  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-02-17 19:26:24 $
     10*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-03-31 02:32:20 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    292292
    293293    psMemBlock* ptr = NULL;
     294
     295    size = (size < recycleBinSize[0]) ? recycleBinSize[0] : size; // set the minimum size to allocate
    294296
    295297    // memory is of the size I want to bother recycling?
     
    372374psPtr p_psRealloc(psPtr vptr, size_t size, const char *file, psS32 lineno)
    373375{
     376    size = (size < recycleBinSize[0]) ? recycleBinSize[0] : size; // set the minimum size to allocate
     377
    374378    if (vptr == NULL) {
    375379        return p_psAlloc(size, file, lineno);
  • trunk/psLib/src/sysUtils/psMemory.c

    r3264 r3585  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-02-17 19:26:24 $
     10*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-03-31 02:32:20 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    292292
    293293    psMemBlock* ptr = NULL;
     294
     295    size = (size < recycleBinSize[0]) ? recycleBinSize[0] : size; // set the minimum size to allocate
    294296
    295297    // memory is of the size I want to bother recycling?
     
    372374psPtr p_psRealloc(psPtr vptr, size_t size, const char *file, psS32 lineno)
    373375{
     376    size = (size < recycleBinSize[0]) ? recycleBinSize[0] : size; // set the minimum size to allocate
     377
    374378    if (vptr == NULL) {
    375379        return p_psAlloc(size, file, lineno);
Note: See TracChangeset for help on using the changeset viewer.