xmalloc.h revision 162853
1286432Sbapt/* $OpenBSD: xmalloc.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */
2286432Sbapt
3286432Sbapt/*
4286432Sbapt * Author: Tatu Ylonen <ylo@cs.hut.fi>
5286432Sbapt * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6286432Sbapt *                    All rights reserved
7286432Sbapt * Created: Mon Mar 20 22:09:17 1995 ylo
8286432Sbapt *
9286432Sbapt * Versions of malloc and friends that check their results, and never return
10286432Sbapt * failure (they call fatal if they encounter an error).
11286432Sbapt *
12286432Sbapt * As far as I am concerned, the code I have written for this software
13286432Sbapt * can be used freely for any purpose.  Any derived versions of this
14286432Sbapt * software must be clearly marked as such, and if the derived work is
15286432Sbapt * incompatible with the protocol description in the RFC file, it must be
16286432Sbapt * called by a name other than "ssh" or "Secure Shell".
17286432Sbapt */
18286432Sbapt
19286432Sbaptvoid	*xmalloc(size_t);
20286432Sbaptvoid	*xcalloc(size_t, size_t);
21286432Sbaptvoid	*xrealloc(void *, size_t, size_t);
22286432Sbaptvoid     xfree(void *);
23286432Sbaptchar	*xstrdup(const char *);
24286432Sbaptint	 xasprintf(char **, const char *, ...)
25286432Sbapt                __attribute__((__format__ (printf, 2, 3)))
26286432Sbapt                __attribute__((__nonnull__ (2)));
27286432Sbapt