X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fadt%2Fxmalloc.c;h=e44d8b0bff4d7336134188ebe736778a1e8a12ae;hb=2d09549421b49587d4680a94dab277646e9fef44;hp=9511978ba137d5eefa6b8c32dc5a57fe42ccfb40;hpb=e3e22fa6f927847099c0bff62457003aa81f2518;p=libfirm diff --git a/ir/adt/xmalloc.c b/ir/adt/xmalloc.c index 9511978ba..e44d8b0bf 100644 --- a/ir/adt/xmalloc.c +++ b/ir/adt/xmalloc.c @@ -1,7 +1,14 @@ -/* Xmalloc --- never failing wrappers for malloc() & friends. - Copyright (C) 1995, 1996 Markus Armbruster */ - -/* $Id$ */ +/* + * Project: libFIRM + * File name: ir/adt/xmalloc.c + * Purpose: Xmalloc --- never failing wrappers for malloc() & friends. + * Author: Markus Armbruster + * Modified by: + * Created: 1999 by getting from fiasco + * CVS-ID: $Id$ + * Copyright: (c) 1995, 1996 Markus Armbruster + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ /* @@@ ToDo: replace this file with the one from liberty. [reimplement xstrdup, ... ] */ @@ -12,7 +19,8 @@ #include #include -#include "misc.h" + +#include "xmalloc.h" #include "panic.h" @@ -22,6 +30,9 @@ void * void *res = malloc (size); if (!res) xnomem (); + + memset (res, 0x00, size); + return res; } @@ -33,6 +44,7 @@ void * void *res = ptr ? realloc (ptr, size) : malloc (size); if (!res) xnomem (); + return res; }