Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Sanity checking

2009-02-23 by H. Carl Ott

On Mon, Feb 23, 2009 at 10:39 AM, David VanHorn <microbrix@gmail.com> wrote:
> In C, is there a simple way to test wether the system has run out of
> memory while the program is running?
>
> --

Just trying to get up to speed with C myself.  I think the standard
trick of getting an initialized var into a known location near the top
of ram, then check to see if your stack clobbered it is the simplest.

  Of course, you might be in bad shape at that point.


-- 
carl
--------------------------------------------------------
Henry Carl Ott   N2RVQ    hcarlott@gmail.com

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.