IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2004, 12:36:04 PM (22 years ago)
Author:
desonia
Message:

changed psImageSubset to subset an image without making a deep copy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psMemory.h

    r1448 r1606  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-10 01:55:34 $
     14 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-23 22:36:03 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    135135               );
    136136
    137 void p_psMemSetDeallocator(void *ptr, psFreeFcn freeFcn);
    138 psFreeFcn p_psMemGetDeallocator(void *ptr);
    139 
    140137/// Memory allocation. psAlloc sends file and line number to p_psAlloc.
    141138#define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__)
    142139#endif
     140
     141/** Set the deallocator routine
     142 *
     143 *  A deallocator routine can optionally be assigned to a memory block to
     144 *  ensure that associated memory blocks also get freed, e.g., memory buffers
     145 *  referenced within a struct.
     146 *
     147 */
     148void p_psMemSetDeallocator(
     149    void *ptr,                         ///< the memory block to operate on
     150    psFreeFcn freeFcn                  ///< the function to be executed at deallocation
     151);
     152
     153/** Get the deallocator routine
     154 *
     155 *  This function returns the deallocator for a memory block.  A deallocator
     156 *  routine can optionally be assigned to a memory block to ensure that
     157 *  associated memory blocks also get freed, e.g., memory buffers referenced
     158 *  within a struct. 
     159 *
     160 *  @return psFreeFcn    the routine to be called at deallocation.
     161 */
     162psFreeFcn p_psMemGetDeallocator(
     163    void *ptr                          ///< the memory block
     164);
    143165
    144166/** Memory re-allocation.  This operates much like realloc(), but is guaranteed to return a non-NULL value.
Note: See TracChangeset for help on using the changeset viewer.