10Sstevel@tonic-gate /* $OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $ */ 20Sstevel@tonic-gate 30Sstevel@tonic-gate #ifndef _XMALLOC_H 40Sstevel@tonic-gate #define _XMALLOC_H 50Sstevel@tonic-gate 60Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 70Sstevel@tonic-gate 80Sstevel@tonic-gate #ifdef __cplusplus 90Sstevel@tonic-gate extern "C" { 100Sstevel@tonic-gate #endif 110Sstevel@tonic-gate 120Sstevel@tonic-gate 130Sstevel@tonic-gate /* 140Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 150Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 160Sstevel@tonic-gate * All rights reserved 170Sstevel@tonic-gate * Created: Mon Mar 20 22:09:17 1995 ylo 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * Versions of malloc and friends that check their results, and never return 200Sstevel@tonic-gate * failure (they call fatal if they encounter an error). 210Sstevel@tonic-gate * 220Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 230Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 240Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 250Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 260Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 270Sstevel@tonic-gate */ 280Sstevel@tonic-gate 290Sstevel@tonic-gate void *xmalloc(size_t); 30*3946Sjp161948 void *xcalloc(size_t, size_t); 310Sstevel@tonic-gate void *xrealloc(void *, size_t); 320Sstevel@tonic-gate void xfree(void *); 330Sstevel@tonic-gate char *xstrdup(const char *); 340Sstevel@tonic-gate 350Sstevel@tonic-gate #ifdef __cplusplus 360Sstevel@tonic-gate } 370Sstevel@tonic-gate #endif 380Sstevel@tonic-gate 390Sstevel@tonic-gate #endif /* _XMALLOC_H */ 40