1296781Sdes/* $OpenBSD: xmalloc.h,v 1.16 2016/02/15 09:47:49 dtucker Exp $ */ 292555Sdes 357429Smarkm/* 457429Smarkm * Author: Tatu Ylonen <ylo@cs.hut.fi> 557429Smarkm * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 657429Smarkm * All rights reserved 757429Smarkm * Created: Mon Mar 20 22:09:17 1995 ylo 860573Skris * 957429Smarkm * Versions of malloc and friends that check their results, and never return 1057429Smarkm * failure (they call fatal if they encounter an error). 1160573Skris * 1265668Skris * As far as I am concerned, the code I have written for this software 1365668Skris * can be used freely for any purpose. Any derived versions of this 1465668Skris * software must be clearly marked as such, and if the derived work is 1565668Skris * incompatible with the protocol description in the RFC file, it must be 1665668Skris * called by a name other than "ssh" or "Secure Shell". 1757429Smarkm */ 1857429Smarkm 19296781Sdesvoid ssh_malloc_init(void); 2092555Sdesvoid *xmalloc(size_t); 21162852Sdesvoid *xcalloc(size_t, size_t); 22295367Sdesvoid *xreallocarray(void *, size_t, size_t); 2398675Sdeschar *xstrdup(const char *); 24162852Sdesint xasprintf(char **, const char *, ...) 25162852Sdes __attribute__((__format__ (printf, 2, 3))) 26162852Sdes __attribute__((__nonnull__ (2))); 27