1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_IsOnMainMemory</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_IsOnMainMemory / OS_IsOnWram <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/os.h&gt;</CODE></PRE>
16
17<CODE>BOOL OS_IsOnMainMemory(void* ptr);<BR>
18
19BOOL OS_IsOnExtendedMainMemory(void* ptr);<BR>
20
21BOOL OS_IsOnWramA(void* ptr);<BR> BOOL OS_IsOnWramB(void* ptr);<BR> BOOL OS_IsOnWramC(void* ptr);<BR> BOOL OS_IsOnWram0(void* ptr);<BR> BOOL OS_IsOnWram1(void* ptr);<BR> BOOL OS_IsOnWram(void* ptr);<BR>
22
23BOOL OS_IsOnVram(void* ptr);<BR> BOOL OS_IsOnItcm(void* ptr);<BR> BOOL OS_IsOnDtcm(void* ptr);<BR> BOOL OS_IsOnArm7PrvWram(void* ptr);<BR>
24
25
26</CODE></PRE>
27
28</DL>
29<H2>Arguments</H2>
30<TABLE border="1" width="100%">
31  <TBODY>
32    <TR>
33<TD width="13%"><EM><STRONG>ptr</STRONG></EM></TD>
34<TD width="87%">Pointer to memory region to be checked.</TD>
35    </TR>
36  </TBODY>
37</TABLE>
38<H2>Return Values</H2>
39<P>Returns <CODE>TRUE</CODE> if the memory address indicated by <SPAN class="argument">ptr</SPAN> is in the memory to be checked.</P>
40<H2>Description</H2>
41<P>Checks the memory address indicated by <SPAN class="argument">ptr</SPAN>.</P>
42<P>The <CODE>OS_IsOnMainMemory</CODE> function checks whether the memory address indicated by the pointer exists in main memory.</P>
43<P>The <CODE>OS_IsOnExtendedMainMemory</CODE> function checks whether the memory address indicated by the pointer exists in extended main memory.</P>
44<P>The <CODE>OS_IsOnWramA</CODE> function checks whether the memory address indicated by the pointer exists in WRAM A. If this function is called from the ARM9 or a NITRO system, it always returns <CODE>FALSE</CODE>.</P>
45<P>The <CODE>OS_IsOnWramB</CODE> function checks whether the memory address indicated by the pointer exists in WRAM B. Always returns <CODE>FALSE</CODE> for NITRO.</P>
46<P>The <CODE>OS_IsOnWramC</CODE> function checks whether the memory address indicated by the pointer exists in WRAM C. Always returns <CODE>FALSE</CODE> for NITRO.</P>
47<P>The <CODE>OS_IsOnWram0</CODE> function checks whether the memory address indicated by the pointer exists in WRAM 0.</P>
48<P>The <CODE>OS_IsOnWram1</CODE> function checks whether the memory address indicated by the pointer exists in WRAM 1.</P>
49<P>The <CODE>OS_IsOnWram</CODE> function checks whether the memory address indicated by the pointer exists in either WRAM A, WRAM B, WRAM C, WRAM 0 or WRAM 1. </P>
50<P>The <CODE>OS_IsOnVram</CODE> function checks whether the memory address indicated by the pointer exists in VRAM.</P>
51<P>The <CODE>OS_IsOnItcm</CODE> function checks whether the memory address indicated by the pointer exists in ITCM. If this function is called from the ARM7, its check always returns <CODE>FALSE</CODE>.</P>
52<P>The <CODE>OS_IsOnDtcm</CODE> function checks whether the memory address indicated by the pointer exists in DTCM. If this function is called from the ARM7, its check always returns <CODE>FALSE</CODE>.</P>
53<P>The <CODE>OS_IsOnArm7PrvWram</CODE> function checks whether the memory address indicated by the pointer exists in ARM7-dedicated WRAM. If this function is called from the ARM9, its check always returns <CODE>FALSE</CODE>.</P>
54
55<H2>See Also</H2>
56<A href="OS_AllocFromHeap.html">OS_AllocFromHeap</A><BR></CODE></P>
57<H2>Revision History</H2>
582009/04/13 Initial version.</P>
59<hr><p>CONFIDENTIAL</p></body>
60</HTML>