<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: How much Free RAM ?</title>
		<link>http://forums.leaflabs.com/topic.php?id=992</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:18:24 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=992" rel="self" type="application/rss+xml" />

		<item>
			<title>ala42 on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-25730</link>
			<pubDate>Wed, 08 May 2013 19:05:45 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">25730@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It might be more efficient to move the filter code to ram than moving the coefficients to ram. Also slightly optimizing the filter code or using a newer compiler can completely change the game.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hans leuthold on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-25728</link>
			<pubDate>Wed, 08 May 2013 17:31:24 +0000</pubDate>
			<dc:creator>hans leuthold</dc:creator>
			<guid isPermaLink="false">25728@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;thanks for pointing me in the right direction
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-25727</link>
			<pubDate>Wed, 08 May 2013 16:35:02 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">25727@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hans leuthold - &#60;em&#62;&#34;Xavier asked &#34;What about the read latency access, is the RAM faster then FLASH ?&#60;br /&#62;
Where can i find details on this ?&#34;&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;RM0008 Reference manual for STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and STM32F107xx advanced ARM-based 32-bit MCUs&#60;br /&#62;
Edit: &#60;a href=&#34;http://www.st.com/web/en/resource/technical/document/reference_manual/CD00171190.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.st.com/web/en/resource/technical/document/reference_manual/CD00171190.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;3.3.3 Embedded Flash memory&#60;br /&#62;
&#34;The wait states represent the ratio of the SYSCLK (system clock) period to the Flash memory access time:&#60;br /&#62;
zero wait state, if 0 &#38;lt; SYSCLK ≤ 24 MHz&#60;br /&#62;
one wait state, if 24 MHz &#38;lt; SYSCLK ≤ 48 MHz&#60;br /&#62;
two wait states, if 48 MHz &#38;lt; SYSCLK ≤ 72 MHz&#34;&#60;/p&#62;
&#60;p&#62;AFAIK RAM is zero wait states at 72MHz (unless DMA is competing).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hans leuthold on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-25725</link>
			<pubDate>Wed, 08 May 2013 12:32:37 +0000</pubDate>
			<dc:creator>hans leuthold</dc:creator>
			<guid isPermaLink="false">25725@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;Xavier asked &#34;What about the read latency access, is the RAM faster then FLASH ?&#60;br /&#62;
Where can i find details on this ?&#34;&#60;/p&#62;
&#60;p&#62;Maybe there is a tidbit here: I am using a Maple Rev5 to decimate a bit stream coming in at 273.6kHz with 4 filters each 256 words long&#60;/p&#62;
&#60;p&#62;the filter coefficients are set up as tables like&#60;/p&#62;
&#60;p&#62;int sinecoeffs[256] = { all the CSV integer values };&#60;/p&#62;
&#60;p&#62;Having read all the posts above I tried to declare that table as const to save RAM.&#60;br /&#62;
What I notice is that the loop time is impacted to such a degree that the 273.6kHz throughput cannot be achieved anymore.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6090</link>
			<pubDate>Fri, 26 Aug 2011 11:42:09 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">6090@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;In an &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=992#post-6076&#34;&#62;earlier post&#60;/a&#62; mbolivar suggested reading PM0042.  He could not find the file on the st.com web site, so he gave a link to an October 2009 (revision 7) of PM0042 found on a googlecode site.&#60;/p&#62;
&#60;p&#62;Yes, it is hard to find stuff on the st.com site, but I have a very simple explanation for the missing file.  For some reason, PM0042 was replaced by PM0075.  This is confirmed on the past page of the revision history for PM0075.  Rev 1 of PM0075 (August 2010) has the same content as Rev 8 of PM0042.&#60;/p&#62;
&#60;p&#62;robodude666 provided a direct link in this topic:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=995#post-6064&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=995#post-6064&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Time to update the bookmarks (again).&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6082</link>
			<pubDate>Thu, 25 Aug 2011 12:53:00 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">6082@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Great!  Glad to hear it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6081</link>
			<pubDate>Thu, 25 Aug 2011 12:46:16 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">6081@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks a lot Marti, very interesting informations.&#60;br /&#62;
I'm going to use both const and __FLASH__.&#60;br /&#62;
And thanks robodude for the benchmark link.&#60;/p&#62;
&#60;p&#62;The good news for me, is that with my wavetables in FLASH, my synth can still handle the same number of voices (but must be closer to the audio pop/glitch limit).&#60;br /&#62;
And as i have more space i could add 2 other bandlimited waveforms: square and sawtooth...&#60;br /&#62;
And they sound good :-)&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6077</link>
			<pubDate>Wed, 24 Aug 2011 18:54:55 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">6077@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Embedded Signals, the guys who wrote an assembly-optimized FFT library for the STM Cortex M3, has a couple benchmarks up:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.embeddedsignals.com/FFTlibrary2bench.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.embeddedsignals.com/FFTlibrary2bench.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The benchmarks represent the number of CPU cycles required to perform a task. What the specific task is is irrelevant (more or less), just the performance change between the different memory used is important to note.&#60;/p&#62;
&#60;p&#62;From the benchmarks, LAT2 performance is slightly worse than LAT1 or LAT0 performance. Loading coefficients from RAM vs FLASH shows another small boost in performance as well.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6076</link>
			<pubDate>Wed, 24 Aug 2011 18:50:28 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">6076@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Xavier,&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
What about the read latency access, is the RAM faster then FLASH ?&#60;br /&#62;
Where can i find details on this ?
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;&#60;code&#62;setupFlash()&#60;/code&#62; in boards.cpp (which is called from &#60;code&#62;init()&#60;/code&#62;) uses FLASH_WAIT_STATE_2:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;static void setupFlash(void) {
    flash_enable_prefetch();
    flash_set_latency(FLASH_WAIT_STATE_2);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I'm not sure how much help you get from prefetching on this.  For more references, I guess I'd check out ST PM0042, the flash programming manual.  Impossible to find on ST's website like everything else, but here's a link:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://flyingfox.googlecode.com/svn-history/r164/trunk/flight/doc/stm32-flash-programming.pdf&#34; rel=&#34;nofollow&#34;&#62;http://flyingfox.googlecode.com/svn-history/r164/trunk/flight/doc/stm32-flash-programming.pdf&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6074</link>
			<pubDate>Wed, 24 Aug 2011 18:37:00 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">6074@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I've been messing with this a bit; here's what I've found out so far.&#60;/p&#62;
&#60;p&#62;For reference, these tests were all performed with today's libmaple master, which has SHA 3887713e693967983b4247dbb7dd3318a57f73c5.&#60;/p&#62;
&#60;p&#62;This is my test rig:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;#include &#38;quot;wirish.h&#38;quot;

&#38;lt;define an array of uint32 named &#38;#39;array&#38;#39;&#38;gt;

int main(void) {
    while (true) {
        for (unsigned i = 0; i &#38;lt; sizeof(array)/sizeof(array[0]); i++) {
            SerialUSB.write(array[i]);
        }
    }

    return 0;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I used uint32 so that the numbers wouldn't get confused by padding issues. I print the entire array to defeat any optimizations that might prune it out of the final binary, in whole or in part.  Here are some sizes I get for various declarations of &#34;array&#34;:&#60;/p&#62;
&#60;p&#62;With &#34;uint32 array[4] = {1, 2, 3, 4};&#34;&#60;br /&#62;
-------------------------------------&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Object file sizes:
   text	   data	    bss	    dec	    hex	filename
     36	     16	      0	     52	     34	build/main.o&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;As expected, 16 bytes of initialized, mutable data.  This will be the baseline for later comparisons.&#60;/p&#62;
&#60;p&#62;With &#34;uint32 array[8] = {1, 2, 3, 4, 5, 6, 7, 8};&#34;&#60;br /&#62;
-------------------------------------------------&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Object file sizes:
   text	   data	    bss	    dec	    hex	filename
     36	     32	      0	     68	     44	build/main.o&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;As expected, data goes up by 16 bytes, and the other sizes remain the same.  This is consistent with non-const initialized variables living in the .data section.&#60;/p&#62;
&#60;p&#62;With &#34;const uint32 array[4] = {1, 2, 3, 4};&#34;&#60;br /&#62;
-------------------------------------------&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Object file sizes:
   text	   data	    bss	    dec	    hex	filename
     52	      0	      0	     52	     34	build/main.o&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Interestingly, compared to the baseline, text increases by 16 bytes, and data goes down by the same amount.  I took a look at the file build/maple_mini.disas (produced by our Makefile); it had this to say:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;08007f2c &#38;lt;_ZL5array&#38;gt;:
 8007f2c:       00000001 00000002 00000003 00000004     ................&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;0x08007f2c is an address in Flash!  Interesting.&#60;/p&#62;
&#60;p&#62;To dig further, I got GCC to give me its assembly output for main.cpp; here's the relevant excerpt:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;.section        .rodata._ZL5array,&#38;quot;a&#38;quot;,%progbits
        .align  2
        .set    .LANCHOR0,. + 0
        .type   _ZL5array, %object
        .size   _ZL5array, 16
_ZL5array:
        .word   1
        .word   2
        .word   3
        .word   4&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This excerpt from the linker file common_rom.inc explains what happened:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;SECTIONS
{
  .text :

        [ ... irrelevant text omitted ...]

        *(.rodata .rodata.* .gnu.linkonce.r.*)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Whenever GCC sticks something into an .rodata section, the linker shoves it into Flash.  No idea if this happens for all definitions qualified with const.  If so, we might want to deprecate the &#60;code&#62;__FLASH__&#60;/code&#62; macro in favor of just using &#60;code&#62;const&#60;/code&#62;, especially given the situation explained in the following section.&#60;/p&#62;
&#60;p&#62;With &#34;uint32 array[4] __FLASH__ = {1, 2, 3, 4};&#34;&#60;br /&#62;
-----------------------------------------------&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Object file sizes:
   text	   data	    bss	    dec	    hex	filename
     36	     16	      0	     52	     34	build/main.o&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This reproduces your results concerning &#60;code&#62;__FLASH__&#60;/code&#62;, namely, that allocations with &#60;code&#62;__FLASH__&#60;/code&#62; appear in data when size output is determined.  Confusingly, array no longer shows up in the .disas!&#60;/p&#62;
&#60;p&#62;All's not lost, though; from main.cpp's assembly:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;.global array
        .section        .USER_FLASH,&#38;quot;aw&#38;quot;,%progbits
        .align  2
        .set    .LANCHOR0,. + 0
        .type   array, %object
        .size   array, 16
array:
        .word   1
        .word   2
        .word   3
        .word   4&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;It correctly is in section .USER_FLASH, so it will definitely get stored in Flash on the STM32, since common_rom.inc says this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/* expose a custom rom only section */
  .USER_FLASH :
  {
    *(.USER_FLASH)
  } &#38;gt;rom&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And Maple Mini's Flash linker script (support/ld/maple_mini/flash.ld) says this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;MEMORY
{
  ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 17K
  rom (rx)  : ORIGIN = 0x08005000, LENGTH = 108K
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I'm not sure why arm-none-eabi-size is reporting that it lives in data. However, here's a guess: &#60;code&#62;__FLASH__&#60;/code&#62; just ends up expanding into &#60;code&#62;__attribute__((section (&#38;quot;.USER_FLASH&#38;quot;)))&#60;/code&#62;, and that's just a section which we handle specially in our linker scripts.  Since that's all information that arm-none-eabi-size doesn't have, it seems like it's just ignoring the __attribute__(), with the result that array is assumed to live in data.&#60;/p&#62;
&#60;p&#62;That obviously really sucks when trying to figure out how much RAM you're using.  As a workaround, I'd recommend using both &#60;code&#62;const&#60;/code&#62; and &#60;code&#62;__FLASH__&#60;/code&#62; for the time being.  (I checked; all the usages of __FLASH__ in libmaple are also accompanied by 'const', so if the compiler's .rodata behavior is consistent, we shouldn't be giving you any false readings in that regard).&#60;/p&#62;
&#60;p&#62;*Whew*!  Not sure how many people are still reading by this point, but hopefully this should clarify things a bit.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6066</link>
			<pubDate>Tue, 23 Aug 2011 21:53:48 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">6066@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I noticed something unexpected.&#60;/p&#62;
&#60;p&#62;All my &#34;const&#34; variables (not __flash__) are not counted in &#34;data&#34;. Are they loaded in RAM at run time ? Or do they stay in flash memory ?&#60;br /&#62;
Also when i remove &#34;const&#34; they show up in the &#34;data&#34; column even with __FLASH__ (????).&#60;/p&#62;
&#60;p&#62;What about the read latency access, is the RAM faster then FLASH ?&#60;br /&#62;
Where can i find details on this ?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6058</link>
			<pubDate>Tue, 23 Aug 2011 13:21:44 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">6058@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;If you do happen to use dynamic memory allocated and write a magic &#60;code&#62;freeRAMSpaceInBytes()&#60;/code&#62; function, please share!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6046</link>
			<pubDate>Tue, 23 Aug 2011 01:25:36 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">6046@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi Marti,&#60;/p&#62;
&#60;p&#62;Thanks a lot for this nice answer.&#60;br /&#62;
I have to spend some time to digest/study this ;-)&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6030</link>
			<pubDate>Mon, 22 Aug 2011 13:39:06 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">6030@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm no good with ld-script, so these are only guesses, but:&#60;/p&#62;
&#60;p&#62;It looks like the end of statically-allocated RAM is defined by the linker script as _end (in common_ram.inc or common_rom.inc, depending on a Flash or RAM build).  At least, that's what syscalls.c says:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/0.0.11/libmaple/syscalls.c#L28&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/blob/0.0.11/libmaple/syscalls.c#L28&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;That's supported by these lines:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/0.0.11/support/ld/common_ram.inc#L175&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/blob/0.0.11/support/ld/common_ram.inc#L175&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/0.0.11/support/ld/common_rom.inc#L177&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/blob/0.0.11/support/ld/common_rom.inc#L177&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Those lines seem to be assigning _end to the address immediately following the .data and .bss sections.&#60;/p&#62;
&#60;p&#62;Given that, and the definition of _sbrk in syscalls.c, it seems to me that you can use &#60;code&#62;STACK_TOP - sbrk(0)&#60;/code&#62; to get the number of free bytes. (&#60;code&#62;STACK_TOP&#60;/code&#62; is currently defined in libmaple.h).&#60;/p&#62;
&#60;p&#62;Of course, that's a runtime answer; if you want a static answer and are avoiding dynamic memory allocation, then the number of free bytes on Maple Mini should be 17kB - (sizeof(.data) + sizeof(.bss)); the latter sizes are given to you by the libmaple Makefile after each compile, like so:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Final Size:
   text	   data	    bss	    dec	    hex	filename
  27588	   1488	    664	  29740	   742c	build/maple_mini.elf&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Re: what happens when you run out of RAM, if you overflow the &#60;code&#62;ram&#60;/code&#62; memory region defined by your linker script, then your program should refuse to compile.  I seem to recall that you're using a custom Makefile, so I can't guarantee that for your system.  If you overflow it at runtime, then I suppose as usual it depends on your/newlib's error handling.&#60;/p&#62;
&#60;p&#62;HTH, sorry I can't give you more definite answers right now.&#60;/p&#62;
&#60;p&#62;Incidentally, it seems to me that there's a bug in _sbrk() -- I believe that line 46,&#60;/p&#62;
&#60;p&#62;&#60;code&#62;if ((STACK_TOP - (unsigned int)heap_ptr) &#38;gt;= 0) {&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;should actually be&#60;/p&#62;
&#60;p&#62;&#60;code&#62;if ((STACK_TOP - (unsigned int)heap_ptr) &#38;gt;= nbytes) {&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Will confirm w/ Perry.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Xavier on "How much Free RAM ?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=992#post-6028</link>
			<pubDate>Sun, 21 Aug 2011 23:46:18 +0000</pubDate>
			<dc:creator>Xavier</dc:creator>
			<guid isPermaLink="false">6028@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Programming the maple mini with the GCC-chain is still a pleasure and my FM synth is almost finished :-)&#60;/p&#62;
&#60;p&#62;I imagine i'm not far from the 20kb limit.&#60;br /&#62;
I wondered if there is a way to know how much free RAM i still have ?&#60;br /&#62;
What happens when the maple is out of RAM ?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Cheers,&#60;/p&#62;
&#60;p&#62;Xavier
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
