Re: Fragmentation: Is there a solution yet?
"Kunal Shah" <[email protected]> Thu, 3 Jun 2004 08:59:31 -0500
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <003301c44972$fea5bab0$0c02a8c0@KunalShah> |
> > 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. > ... > > I will greatly appreciate any hint/direction to solve this problem. > > You don't want this advice, but I honestly think your problem is only truly > solved by changing the design: stay off the heap -- instead reuse. > > What you face is a problem common to all firmware: if you are constantly > allocating and deallocating, there is no way to guarantee that the system > can run indefinitely. You are stuck in your position, _hoping_ that the > heap manager will allocate in a certain way. Or, you have to develop your > own heap manager that uses knowledge of the specific application to provide > deterministic behavior. > > In your case, a reuse/recycle approach is to lay down a pool of files of > appropriate size when the application starts. While the app runs, it just > reads and writes to these, never changing their size/names. This probably > means, you have to stop using the stream readers & writers and change to > random access. This type of approach leads to a behavior you need for a > product: if it boots, it will run _forever_. > > Second, consider why you are using the file system at all. The TINI is a > slightly different beast in that the file store is in the same RAM as the > JVM. I don't know the specifics of your app, but storing intermediate > results in the file store may be of no benefit to just keeping the results > in memory. > Thankyou very much for the response. Yep u r right.. I have to get rid of file system. Eventhough I have to change design of our application this seems to be necessary now. But which memory you r pointing to when u r saying about keeping results in memory.. I want atleast a non-volatile memory to store them. I am not a hardware guy so don't understand about memory mappings much.. But yesterday I found out that we can use 308000- 30FFFF (CE3-part-2) and 320000-38FFFF (CE3-part-4) using DataPort class.. Is this memory currently available to application in TINI-400. Or we have to use external memory..(like any of PCE??).. Thanks again. Kunal Shah Development SensorLogic | M2M made easy. 972-934-7375 x 2121 972-934-7376 (fax) [email protected] www.Sensorlogic.com _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini