/*
* Copyright (c) 2000-2001, 2006 Proofpoint, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: heap.h,v 1.24 2013-11-22 20:51:31 ca Exp $
*/
/*
** Sendmail debugging memory allocation package.
*/
#ifndef SM_HEAP_H
# define SM_HEAP_H
# include <stdlib.h>
/* change default to 0 for production? */
# ifndef SM_HEAP_CHECK
# endif /* ! SM_HEAP_CHECK */
# if SM_HEAP_CHECK
extern void sm_free_tagged __P((void *, char *, int));
extern void sm_heap_checkptr_tagged __P((void *, char *, int));
# else /* SM_HEAP_CHECK */
# endif /* SM_HEAP_CHECK */
#if 0
/*
** sm_f[mc]alloc are plug in replacements for malloc and calloc
** which can be used in a context requiring a function pointer,
** and which are compatible with sm_free. Warning: sm_heap_report
** cannot report where storage leaked by sm_f[mc]alloc was allocated.
*/
/* XXX unused right now */
extern void *
size_t));
extern void *
size_t));
#endif /* 0 */
/*
** Allocate 'permanent' storage that can be freed but may still be
** allocated when the process exits. sm_heap_report will not complain
** about a storage leak originating from a call to sm_pmalloc.
*/
do \
{ \
{ \
} \
} while (0)
extern int SmHeapGroup;
extern int SmHeapMaxGroup;
extern SM_DEBUG_T SmHeapTrace;
extern SM_DEBUG_T SmHeapCheck;
extern SM_EXC_T SmHeapOutOfMemory;
#endif /* ! SM_HEAP_H */