Indentation fix, cleanup.
[AROS.git] / rom / exec / typeofmem.c
blobc6b33b5a9858b56d76696ab5ea10bba18578b500
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Examine memory
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <exec/memory.h>
11 #include <exec/execbase.h>
12 #include <aros/libcall.h>
13 #include <proto/exec.h>
15 #include "memory.h"
17 /*****************************************************************************
19 NAME */
21 AROS_LH1(ULONG, TypeOfMem,
23 /* SYNOPSIS */
24 AROS_LHA(APTR, address, A1),
26 /* LOCATION */
27 struct ExecBase *, SysBase, 89, Exec)
29 /* FUNCTION
30 Return type of memory at a given address or 0 if there is no memory
31 there.
33 INPUTS
34 address - Address to test
36 RESULT
37 The memory flags you would give to AllocMem().
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 ******************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct MemHeader *mh = FindMem(address, SysBase);
55 /* We have either found the memory or not */
56 return mh ? mh->mh_Attributes : 0;
58 AROS_LIBFUNC_EXIT
59 } /* TypeOfMem */