/[ascend]/trunk/base/generic/utilities/ascMalloc.h
ViewVC logotype

Diff of /trunk/base/generic/utilities/ascMalloc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 599 by johnpye, Fri May 12 12:53:57 2006 UTC revision 600 by johnpye, Fri May 12 14:30:18 2006 UTC
# Line 100  Line 100 
100   *  @return A new copy of str as a char *, or NULL if an error occurs.   *  @return A new copy of str as a char *, or NULL if an error occurs.
101   */   */
102    
103  ASC_DLLSPEC(char) *ascstrdupf(CONST char *str);  ASC_DLLSPEC(char *) ascstrdupf(CONST char *str);
104  /**<  /**<
105   *  Implementation function for ascstrdup() if MALLOC_DEBUG   *  Implementation function for ascstrdup() if MALLOC_DEBUG
106   *  is not defined.  Do not call this function directly - use   *  is not defined.  Do not call this function directly - use
# Line 256  extern void ascstatus_detailf(CONST char Line 256  extern void ascstatus_detailf(CONST char
256   *  @param msg The message to print before the detail report.   *  @param msg The message to print before the detail report.
257   */   */
258    
259  extern void ascshutdownf(CONST char *msg);  ASC_DLLSPEC(void) ascshutdownf(CONST char *msg);
260  /**<  /**<
261   *  Implementation function for ascshutdown() if MALLOC_DEBUG   *  Implementation function for ascshutdown() if MALLOC_DEBUG
262   *  is defined.  Do not call this function directly - define   *  is defined.  Do not call this function directly - define
# Line 269  extern void ascshutdownf(CONST char *msg Line 269  extern void ascshutdownf(CONST char *msg
269  #  define ascmeminuse() (0)  #  define ascmeminuse() (0)
270  #endif  #endif
271    
272  extern unsigned long ascmeminusef(void);  ASC_DLLSPEC(unsigned long) ascmeminusef(void);
273  /**<  /**<
274   *  Returns the current total amount of allocated memory (iff   *  Returns the current total amount of allocated memory (iff
275   *  MALLOC_DEBUG is #defined).  If MALLOC_DEBUG is not #defined,   *  MALLOC_DEBUG is #defined).  If MALLOC_DEBUG is not #defined,
# Line 305  extern unsigned long ascmeminusef(void); Line 305  extern unsigned long ascmeminusef(void);
305   *  @return A (void *) to the newly-allocated block, or NULL on error.   *  @return A (void *) to the newly-allocated block, or NULL on error.
306   */   */
307    
308  extern VOIDPTR asccallocf(size_t nelem, size_t elsize,  ASC_DLLSPEC(VOIDPTR) asccallocf(size_t nelem, size_t elsize,
309                            CONST char *file, int line);                            CONST char *file, int line);
310  /**<  /**<
311   *  Implementation function for asccalloc() when MALLOC_DEBUG   *  Implementation function for asccalloc() when MALLOC_DEBUG
# Line 329  extern VOIDPTR asccallocf(size_t nelem, Line 329  extern VOIDPTR asccallocf(size_t nelem,
329   *  @return A (void *) to the newly-allocated block, or NULL on error.   *  @return A (void *) to the newly-allocated block, or NULL on error.
330   */   */
331    
332  extern VOIDPTR ascmallocf(size_t size, CONST char * file, int line);  ASC_DLLSPEC(VOIDPTR) ascmallocf(size_t size, CONST char * file, int line);
333  /**<  /**<
334   *  Implementation function for ascmalloc() when MALLOC_DEBUG   *  Implementation function for ascmalloc() when MALLOC_DEBUG
335   *  is defined.  Do not call this function directly - define   *  is defined.  Do not call this function directly - define
# Line 358  extern VOIDPTR ascmallocf(size_t size, C Line 358  extern VOIDPTR ascmallocf(size_t size, C
358   *  @return A (void *) to the newly-allocated block, or NULL on error.   *  @return A (void *) to the newly-allocated block, or NULL on error.
359   */   */
360    
361  extern VOIDPTR ascreallocf(VOIDPTR ptr, size_t size,  ASC_DLLSPEC(VOIDPTR) ascreallocf(VOIDPTR ptr, size_t size,
362                             CONST char *file, int line);                             CONST char *file, int line);
363  /**<  /**<
364   *  Implementation function for ascrealloc() when MALLOC_DEBUG   *  Implementation function for ascrealloc() when MALLOC_DEBUG
# Line 380  extern VOIDPTR ascreallocf(VOIDPTR ptr, Line 380  extern VOIDPTR ascreallocf(VOIDPTR ptr,
380   *  @param ptr Pointer to the memory block to free.   *  @param ptr Pointer to the memory block to free.
381   */   */
382    
383  extern void ascfreef(VOIDPTR ptr, CONST char *file, int line);  ASC_DLLSPEC(void) ascfreef(VOIDPTR ptr, CONST char *file, int line);
384  /**<  /**<
385   *  Implementation function for ascfree() when MALLOC_DEBUG   *  Implementation function for ascfree() when MALLOC_DEBUG
386   *  is defined.  Do not call this function directly - define   *  is defined.  Do not call this function directly - define
# Line 407  extern void ascfreef(VOIDPTR ptr, CONST Line 407  extern void ascfreef(VOIDPTR ptr, CONST
407   *  @return A (void *) to dest.   *  @return A (void *) to dest.
408   */   */
409    
410  extern VOIDPTR ascbcopyf(CONST VOIDPTR src, VOIDPTR dest, size_t size,  ASC_DLLSPEC(VOIDPTR) ascbcopyf(CONST VOIDPTR src, VOIDPTR dest, size_t size,
411                           CONST char *file, int line);                           CONST char *file, int line);
412  /**<  /**<
413   *  Implementation function for ascbcopy() when MALLOC_DEBUG   *  Implementation function for ascbcopy() when MALLOC_DEBUG
# Line 433  extern VOIDPTR ascbcopyf(CONST VOIDPTR s Line 433  extern VOIDPTR ascbcopyf(CONST VOIDPTR s
433   *  @return A (void *) to dest.   *  @return A (void *) to dest.
434   */   */
435    
436  extern VOIDPTR ascbzerof(VOIDPTR dest, size_t length, CONST char *file, int line);  ASC_DLLSPEC(VOIDPTR) ascbzerof(VOIDPTR dest, size_t length, CONST char *file, int line);
437  /**<  /**<
438   *  Implementation function for ascbzero() when MALLOC_DEBUG   *  Implementation function for ascbzero() when MALLOC_DEBUG
439   *  is defined.  Do not call this function directly - define   *  is defined.  Do not call this function directly - define
# Line 458  extern VOIDPTR ascbzerof(VOIDPTR dest, s Line 458  extern VOIDPTR ascbzerof(VOIDPTR dest, s
458   *  @param size size_t, size of the memory block to look up.   *  @param size size_t, size of the memory block to look up.
459   */   */
460    
461  extern int AllocatedMemoryF(CONST VOIDPTR ptr, size_t size);  ASC_DLLSPEC(int) AllocatedMemoryF(CONST VOIDPTR ptr, size_t size);
462  /**<  /**<
463   *  Implementation function for AllocatedMemory() when   *  Implementation function for AllocatedMemory() when
464   *  MALLOC_DEBUG is defined.  Do not call this function   *  MALLOC_DEBUG is defined.  Do not call this function
# Line 478  extern int AllocatedMemoryF(CONST VOIDPT Line 478  extern int AllocatedMemoryF(CONST VOIDPT
478   *  defined, always returns 1.   *  defined, always returns 1.
479   */   */
480    
481  extern int InMemoryBlockF(CONST VOIDPTR ptr1, CONST VOIDPTR ptr2);  ASC_DLLSPEC(int) InMemoryBlockF(CONST VOIDPTR ptr1, CONST VOIDPTR ptr2);
482  /**<  /**<
483   *  Implementation function for InMemoryBlock() when MALLOC_DEBUG   *  Implementation function for InMemoryBlock() when MALLOC_DEBUG
484   *  is defined.  Do not call this function directly - define   *  is defined.  Do not call this function directly - define

Legend:
Removed from v.599  
changed lines
  Added in v.600

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22