File: malloc.h

package info (click to toggle)
fdclone 3.01b-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,772 kB
  • ctags: 8,674
  • sloc: ansic: 100,552; makefile: 4,497; sh: 1,480; sed: 224
file content (22 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 *	malloc.h
 *
 *	definitions & function prototype declarations for "malloc.c"
 */

#define	BUFUNIT			32
#define	b_size(n, type)		((((n) / BUFUNIT) + 1) \
				* BUFUNIT * sizeof(type))
#define	b_realloc(ptr, n, type)	(((n) % BUFUNIT) ? ((type *)(ptr)) \
				: (type *)Xrealloc(ptr, b_size(n, type)))

extern char *Xmalloc __P_((ALLOC_T));
extern char *Xrealloc __P_((VOID_P, ALLOC_T));
extern VOID Xfree __P_((VOID_P));
extern char *Xstrdup __P_((CONST char *));
extern char *Xstrndup __P_((CONST char *, int));
extern char *c_realloc __P_((char *, ALLOC_T, ALLOC_T *));
#ifndef	MINIMUMSHELL
extern int vasprintf2 __P_((char **, CONST char *, va_list));
extern char *asprintf2 __P_((CONST char *, ...));
#endif