2 Copyright � 2003-2013, The AROS Development Team. All rights reserved.
6 #include <aros/libcall.h>
7 #include <proto/exec.h>
8 #include <exec/memheaderext.h>
10 #include "exec_intern.h"
12 /*****************************************************************************
16 AROS_LH2(void, FreeVecPooled
,
19 AROS_LHA(APTR
, poolHeader
, A0
),
20 AROS_LHA(APTR
, memory
, A1
),
23 struct ExecBase
*, SysBase
, 170, Exec
)
26 Free memory that was allocated out of a private memory pool by
30 poolHeader - Handle of the memory pool
31 memory - Pointer to the memory
42 CreatePool(), DeletePool(), AllocVecPooled()
45 In AROS memory allocated from pool remembers where it came from.
46 Because of this poolHeader is effectively ignored and is present
47 only for compatibility reasons. However, do not rely on this! For
48 other operating systems of Amiga(tm) family this is not true!
50 ******************************************************************************/
54 struct MemHeaderExt
*mhe
= (struct MemHeaderExt
*)poolHeader
;
56 /* If there is nothing to free do nothing. */
60 if (IsManagedMem(mhe
))
63 mhe
->mhe_FreeVec(mhe
, memory
);
69 IPTR
*real
= (IPTR
*) memory
;
72 FreePooled(poolHeader
, real
, size
);
76 } /* FreeVecPooled() */