Subject: Strange Behavior - help

From: "Yashwant Shitoot" <[email-masked]>
Date: Thu, 6 May 2004 10:19:43 -0700

Hello Friends,

My root file system and linux is in rom (flash). The linux itself runs
out of ram. When I reprogram the rom, I erase and write a new image of
the rom from a compact flash card. After the new image is programmed in
the function fclose() hangs up, implying that fclose() is rom resident
and loaded as needed. Does this make sense ? Remember even after erasing
the rom fopen() works fine.

Thanks 

Yash

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 6 May 2004 19:33:41 +0200

> Hello Friends,

Allright, dinner on you ;-)

> and loaded as needed. Does this make sense ?

Demand loading that is the binary will be paged in from backing store
(which is your ROM) as needed.

> Remember even after erasing the rom fopen() works fine.

Linux may at any time deciede to discard a page of memory.  It does so
when it think it has a better use for that memory.

Rewriting the underlying device of any filesystem is not a safe thing to
do.  A possible safe approach would be running from a ramdisk, for example.

  Ralf