make fat.handler build again with debug enabled
[tangerine.git] / compiler / arossupport / nastyfreemem.c
blobae3ebca81f5789acb3dec98b571e8fcd7679380c
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Erase contents of memory before freeing it.
6 Lang: english
7 */
9 #include <proto/exec.h>
10 #include <aros/system.h>
11 #include <aros/debug.h>
12 #include <exec/execbase.h>
14 #undef FreeMem /* Don't use any kind of macro here :) We want the real thing */
15 void FreeMem(void *, ULONG);
18 extern struct ExecBase * SysBase;
20 /*****************************************************************************
22 NAME */
23 #include <proto/arossupport.h>
25 void NastyFreeMem (
27 /* SYNOPSIS */
28 APTR mem,
29 ULONG size)
31 /* FUNCTION
32 Overwrites the memory with 0xDEADBEEF before actually freeing it.
34 INPUTS
35 mem - Pointer which was returned by AllocMem()
36 size - Size which was given to AllocMem()
38 RESULT
39 The function may print some infos using kprintf().
41 NOTES
42 This function depends on SysBase.
44 EXAMPLE
46 BUGS
48 SEE ALSO
49 exec.library/FreeMem()
51 INTERNALS
53 HISTORY
54 24-12-95 digulla created
56 ******************************************************************************/
58 MUNGE_BLOCK (mem, size, MEMFILL_FREE);
59 FreeMem (mem, size);
60 } /* NastyFreeMem */