IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 5, 2007, 12:16:48 PM (19 years ago)
Author:
jhoblitt
Message:

add the gcc 'malloc' attribute to p_psAlloc() & p_psRealloc()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/jch-memory/psLib/src/sys/psMemory.h

    r10940 r10941  
    1414 *  @ingroup MemoryManagement
    1515 *
    16  *  @version $Revision: 1.61.2.8 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2007-01-05 21:26:52 $
     16 *  @version $Revision: 1.61.2.9 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2007-01-05 22:16:48 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    139139
    140140#else // #ifdef DOXYGEN
     141
     142#ifdef __GNUC__
    141143psPtr p_psAlloc(
    142144    size_t size,                       ///< Size required
     
    144146    unsigned int lineno,               ///< Line number of caller
    145147    const char *func                   ///< Function name of caller
    146 );
     148) __attribute__((malloc));
     149# else // __GNUC__
     150    psPtr p_psAlloc(
     151        size_t size,                       ///< Size required
     152        const char *file,                  ///< File of caller
     153        unsigned int lineno,               ///< Line number of caller
     154        const char *func                   ///< Function name of caller
     155    );
     156#endif // __GNUC__
    147157
    148158/// Memory allocation. psAlloc sends file and line number to p_psAlloc.
     
    338348#else // #ifdef DOXYGEN
    339349
     350#ifdef __GNUC__
    340351psPtr p_psRealloc(
    341352    psPtr ptr,                         ///< Pointer to re-allocate
     
    344355    unsigned int lineno,               ///< Line number of caller
    345356    const char *func                   ///< Function name of caller
    346 );
     357) __attribute__((malloc));
     358# else // __GNUC__
     359    psPtr p_psRealloc(
     360        psPtr ptr,                         ///< Pointer to re-allocate
     361        size_t size,                       ///< Size required
     362        const char *file,                  ///< File of caller
     363        unsigned int lineno,               ///< Line number of caller
     364        const char *func                   ///< Function name of caller
     365    );
     366#endif // __GNUC__
    347367
    348368/// Memory re-allocation.  psRealloc sends file and line number to p_psRealloc.
Note: See TracChangeset for help on using the changeset viewer.