From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Oliver Kleinke Newsgroups: comp.lang.ada Subject: Re: Ram Usage Date: Mon, 20 Jan 2014 02:36:43 +0100 Organization: A noiseless patient Spider Message-ID: <20140120023643.50ab8007@vostro> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: mx05.eternal-september.org; posting-host="6a201bd8086bff9aeb88c6c96ab0c8db"; logging-data="26584"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uLTPNZYq9/cpT/QCr9Bma3z0Co6FO204=" X-Newsreader: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-pc-linux-gnu) Cancel-Lock: sha1:OeZKWz3SFLNqiSh2834ZQaNKZ+A= Xref: news.eternal-september.org comp.lang.ada:18232 Date: 2014-01-20T02:36:43+01:00 List-Id: > Hi folks, > > I'd like to know if there are anyway to know how much of ram is been > used by my code. > > I tried the avr-size, but it gives you just the static ram. The > problem is how to evaluate the full memory consumption, including the > non-static part. > > Thanks. You can debug with JTAG or a simulator, use an "high-water mark" or dump the SP (or SP minus &__heap_start, calculation may vary depending on your linker flags/ram layout[1]). I think these 3 are the most common methods. -- [1] - http://www.nongnu.org/avr-libc/user-manual/malloc.html