]>
diplodocus.org Git - nmh/blob - sbr/utils.c
7dfe900b6cdc674ddad9e54169b559042f772da2
3 * utils.c -- various utility routines
7 * This code is Copyright (c) 2006, by the authors of nmh. See the
8 * COPYRIGHT file in the root directory of the nmh distribution for
9 * complete copyright information.
17 mh_xmalloc(size_t size
)
22 adios(NULL
, "Tried to malloc 0 bytes");
24 memory
= malloc(size
);
26 adios(NULL
, "Malloc failed");
32 mh_xrealloc(void *ptr
, size_t size
)
37 adios(NULL
, "Tried to realloc 0bytes");
39 memory
= realloc(ptr
, size
);
41 adios(NULL
, "Realloc failed");