1N/A/* Report a memory allocation failure and exit.
1N/A
1N/A Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006, 2009, 2010
1N/A Free Software Foundation, Inc.
1N/A
1N/A This program is free software: you can redistribute it and/or modify
1N/A it under the terms of the GNU General Public License as published by
1N/A the Free Software Foundation; either version 3 of the License, or
1N/A (at your option) any later version.
1N/A
1N/A This program is distributed in the hope that it will be useful,
1N/A but WITHOUT ANY WARRANTY; without even the implied warranty of
1N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A GNU General Public License for more details.
1N/A
1N/A You should have received a copy of the GNU General Public License
1N/A along with this program. If not, see <http://www.gnu.org/licenses/>. */
1N/A
1N/A#include <config.h>
1N/A
1N/A#include "xalloc.h"
1N/A
1N/A#include <stdlib.h>
1N/A
1N/A#include "error.h"
1N/A#include "exitfail.h"
1N/A
1N/A#include "gettext.h"
1N/A#define _(msgid) gettext (msgid)
1N/A
1N/Avoid
1N/Axalloc_die (void)
1N/A{
1N/A error (exit_failure, 0, "%s", _("memory exhausted"));
1N/A
1N/A /* The `noreturn' cannot be given to error, since it may return if
1N/A its first argument is 0. To help compilers understand the
1N/A xalloc_die does not return, call abort. Also, the abort is a
1N/A safety feature if exit_failure is 0 (which shouldn't happen). */
1N/A abort ();
1N/A}