1 /* 2 * The contents of this file are subject to the terms of the 3 * Common Development and Distribution License, Version 1.0 only 4 * (the "License"). You may not use this file except in compliance 5 * with the License. 6 * 7 * See the file CDDL.Schily.txt in this distribution for details. 8 * 9 * When distributing Covered Code, include this CDDL HEADER in each 10 * file and include the License file CDDL.Schily.txt from this distribution. 11 */ 12 /* 13 * @(#)xmalloc.c 1.1 18/12/04 Copyright 2018 J. Schilling 14 */ 15 #if defined(sun) 16 #pragma ident "@(#)xmalloc.c 1.1 18/12/04 Copyright 2018 J. Schilling" 17 #endif 18 19 #if defined(sun) 20 #pragma ident "@(#)xmalloc.c" 21 #pragma ident "@(#)sccs:lib/mpwlib/xmalloc.c" 22 #endif 23 #include <defines.h> 24 25 EXPORT void * xmalloc(size)26xmalloc(size) 27 size_t size; 28 { 29 void *ret; 30 31 if ((ret = malloc(size)) == NULL) { 32 fatal(gettext("OUT OF SPACE (ut9)")); 33 } 34 return (ret); 35 } 36