File: amalloc.h

package info (click to toggle)
ruby-rdiscount 2.1.7.1-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 412 kB
  • ctags: 572
  • sloc: ansic: 4,084; ruby: 440; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * debugging malloc()/realloc()/calloc()/free() that attempts
 * to keep track of just what's been allocated today.
 */
#ifndef AMALLOC_D
#define AMALLOC_D

#include "config.h"

#ifdef USE_AMALLOC

extern void *amalloc(int);
extern void *acalloc(int,int);
extern void *arealloc(void*,int);
extern void afree(void*);
extern void adump();

#define malloc	amalloc
#define	calloc	acalloc
#define realloc	arealloc
#define free	afree

#else

#define adump()	(void)1

#endif

#endif/*AMALLOC_D*/