2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Free memory allocated by AllocVec().
8 #include "exec_intern.h"
9 #include <aros/libcall.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
17 AROS_LH1(void, FreeVec
,
20 AROS_LHA(APTR
, memoryBlock
, A1
),
23 struct ExecBase
*, SysBase
, 115, Exec
)
26 Free some memory previously allocated with AllocVec().
29 memoryBlock - The memory to be freed. It is safe to try to free a NULL
45 ******************************************************************************/
49 /* If there's nothing to free do nothing. */
50 if (memoryBlock
!= NULL
)
52 memoryBlock
-= AROS_ALIGN(sizeof(ULONG
));
53 FreeMem (memoryBlock
, *((ULONG
*)memoryBlock
));