Minor fixes to comments.
[AROS.git] / rom / exec / freevec.c
blob3ed8b662a6604008b98858569b41dd7ab4a489ce
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Free memory allocated by AllocVec().
6 Lang: english
7 */
8 #include "exec_intern.h"
9 #include <aros/libcall.h>
10 #include "memory.h"
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
17 AROS_LH1(void, FreeVec,
19 /* SYNOPSIS */
20 AROS_LHA(APTR, memoryBlock, A1),
22 /* LOCATION */
23 struct ExecBase *, SysBase, 115, Exec)
25 /* FUNCTION
26 Free some memory previously allocated with AllocVec().
28 INPUTS
29 memoryBlock - The memory to be freed. It is safe to try to free a NULL
30 pointer.
32 RESULT
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 AllocVec()
43 INTERNALS
45 ******************************************************************************/
47 AROS_LIBFUNC_INIT
49 /* If there's nothing to free do nothing. */
50 if (memoryBlock != NULL)
52 memoryBlock -= AROS_ALIGN(sizeof(ULONG));
53 FreeMem (memoryBlock, *((ULONG *)memoryBlock));
55 AROS_LIBFUNC_EXIT
56 } /* FreeVec */