source: trunk/third/ssh/xmalloc.h @ 12646

Revision 12646, 1.0 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12645, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2
3xmalloc.h
4
5Author: Tatu Ylonen <ylo@cs.hut.fi>
6
7Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8                   All rights reserved
9
10Created: Mon Mar 20 22:09:17 1995 ylo
11
12Versions of malloc and friends that check their results, and never return
13failure (they call fatal if they encounter an error).
14
15*/
16
17/*
18 * $Id: xmalloc.h,v 1.1.1.2 1999-03-08 17:43:42 danw Exp $
19 * $Log: not supported by cvs2svn $
20 * Revision 1.1.1.1  1996/02/18  21:38:10  ylo
21 *      Imported ssh-1.2.13.
22 *
23 * Revision 1.2  1995/07/13  01:41:41  ylo
24 *      Removed "Last modified" header.
25 *      Added cvs log.
26 *
27 * $Endlog$
28 */
29
30#ifndef XMALLOC_H
31#define XMALLOC_H
32
33/* Like malloc, but calls fatal() if out of memory. */
34void *xmalloc(size_t size);
35
36/* Like realloc, but calls fatal() if out of memory. */
37void *xrealloc(void *ptr, size_t new_size);
38
39/* Frees memory allocated using xmalloc or xrealloc. */
40void xfree(void *ptr);
41
42/* Allocates memory using xmalloc, and copies the string into that memory. */
43char *xstrdup(const char *str);
44
45#endif /* XMALLOC_H */
Note: See TracBrowser for help on using the repository browser.