Re: Fragmentation: Is there a solution yet?
Bryan Armstrong <bryan.armstrong-6tN4nzCoH/[email protected]> Wed, 02 Jun 2004 14:44:51 -0500
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
Kunal Shah wrote: > I found couple of postings about Bryan's intentions of creating an optional > defragment switch or something similar as a solution to this. Can you tell > me status on that. Is this the post to which you refer?: http://marc.theaimsgroup.com/?l=tini&m=99728218932372&w=2 or http://lists.dalsemi.com/maillists/tini/2001-August/081281.html Adding heap compaction capability would require rewriting the entire interpreter as well as most of the IO drivers. I don't see this happening in the near future. > Our application is doing bunch of file creation and deletion to save > intermediate configurations/reports etc. And these I guess is leading to > fragmentation problem causing insufficient heap. Also on file update we are > also storing previous version of file so that tini can rollback to it if > this update faces some problem. This will lead to have three copies of about > 90 KB file at some moment which i guess would be a bad idea if memory cannot > be defragmented. We can clear heap whenever it runs out of contiguous memory > but that will cause it to download all the files again (using PPP) and lost > all the configuration information too..We wanted to have that functionality > used only extremely necessary (like heap corruption) which may not be that > frequent. But our field devices have suffered this insufficient heap problem > in just couple of weeks. So clearing out heap and downloading files again > doesnt seem good solution here. > We even haven't tried to do any remote updating on these devices yet. > > I will greatly appreciate any hint/direction to solve this problem. It sounds like you have 90K X 4 files (including your 88K executable) or about 360K of data in the filesystem. Maybe the application could run System.gc() a couple of times after it jettisons some unneeded objects, then download/manipulate the new/old files. -Bryan If I only had some backing store and an MMU. :) -- -- Bryan Armstrong bryan.armstrong-6tN4nzCoH/[email protected] _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini