2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
5 ANSI C function free().
8 #include "__arosc_privdata.h"
10 #include <exec/memory.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
24 Return memory allocated with malloc() or a similar function to the
28 memory - The result of the previous call to malloc(), etc. or
35 This function must not be used in a shared library or in a threaded
47 ******************************************************************************/
56 mem
= ((UBYTE
*)memory
) - AROS_ALIGN(sizeof(size_t));
57 size
= *((size_t *)mem
) + AROS_ALIGN(sizeof(size_t));
59 FreePooled (__startup_mempool
, mem
, size
);