Initial revision
[fw/sdcc] / doc / SDCCUdoc-16.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5  <TITLE>SDCC Compiler User Guide: Memory Models</TITLE>
6  <LINK HREF="SDCCUdoc-17.html" REL=next>
7  <LINK HREF="SDCCUdoc-15.html" REL=previous>
8  <LINK HREF="SDCCUdoc.html#toc16" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="SDCCUdoc-17.html">Next</A>
12 <A HREF="SDCCUdoc-15.html">Previous</A>
13 <A HREF="SDCCUdoc.html#toc16">Contents</A>
14 <HR>
15 <H2><A NAME="Memory Models"></A> <A NAME="s16">16. Memory Models</A> </H2>
16
17 <P>SDCC allows two memory models, modules compiled with different memory models
18 should be combined together, the results would be unpredictable. The support
19 routines supplied with the compiler are compiled in small-model by default,
20 and will need to be recompiled using the large model if the large model is
21 used. In general the use of the large model is discouraged.
22 <P>When the large model is used all variables declared without a storage class
23 will be allocated into the external ram, this includes all parameters and local
24 variables (for non-reentrant functions). When the small model is used variables
25 without storage class are allocated in the internal ram.
26 <P>Judicious usage of the processor specific storage classes and the 'reentrant'
27 function type will yield much more efficient code, than using the large-model.
28 Several optimizations are disabled when the program is compiled using the large
29 model, it is therefore strongly recommdended that the small model be used unless
30 absolutely required.
31 <HR>
32 <A HREF="SDCCUdoc-17.html">Next</A>
33 <A HREF="SDCCUdoc-15.html">Previous</A>
34 <A HREF="SDCCUdoc.html#toc16">Contents</A>
35 </BODY>
36 </HTML>