CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 106 users online: 5 members, 94 guests and 7 bots.
Members: adriweb, CVSoft, Sorunome, tr1p1ea.
Bots: MSN/Bing (2), Spinn3r (1), Googlebot (4).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
TC01


Member


Joined: 28 Jul 2010
Posts: 170

Posted: 08 Jul 2011 07:45:32 pm    Post subject: Memory Usage for the 89

So, after suddenly finding myself without a project to work on the other day, I resolved to come up with some relatively simple calc utility I could actually code, and then code it.

And I came up with this: Memory Usage, a 68k C program which provides nicely formatted information about how much space is used up on the system.

The AMS's MEM dialog tells you how much space is being used for different variable types and how much is free. I, however, was interested in a folder-by-folder breakdown, among other things.

The attached images summarize the current features pretty well. First, when you run the program, there are three options: "general memory info", "flash app info", and "file/folder info". The general memory info first provides usage statistics about the RAM and the Flash: mostly what you can already get through the AMS's MEM menu. However, it also shows how much memory would be freed through Garbage Collect.

The files/folders mem screen shows a list of all folders and their sizes ordered by size. Selecting a folder opens up a sub menu displaying the number of unarchived bytes and the number of archived bytes. At this point, if you select "All", it shows you an ordered list of all files in that folder; selecting "Archived" or "Unarchived" displays only archived or unarchived programs in that folder, again sorted by size.

Currently, selecting a file does nothing, just exits.

The flash app screen, like the files and folders screen, shows an ordered list of folders by size. The name of an app might be cut off, but selecting the app will display the full name, the application ID (which is a handle to some info about the app in memory), and the size in a little popup window.

It should be compatible with the Titanium, though it cannot run on anything below AMS 1.x.



_________________
Solar89: A 68k Dev Tool for z80 Basic
renamr68k: Utility script for 68k development
Package manager for ticalc.org (command line tool to access it)
Memory Usage: a tool for the 89 to show your memory usage


Last edited by TC01 on 13 Jul 2011 09:43:26 pm; edited 2 times in total
Back to top
TC01


Member


Joined: 28 Jul 2010
Posts: 170

Posted: 13 Jul 2011 08:46:46 pm    Post subject:

After a bit more debugging and coding, here's a real release of this program. I've fixed all the weirdness that was occurring on my 89 (and improved memory usage while I was at it).

Also, with debrouxl's assistance, I added a menu for displaying Flash applications. It works much the same as the folder\file system, but selecting a flash application brings up a little popup giving the full name (the name has to get cut off for size in some places), the application ID on your system, and the size.

Hopefully, even though the 68k community is dead, someone finds this potentially useful...
_________________
Solar89: A 68k Dev Tool for z80 Basic
renamr68k: Utility script for 68k development
Package manager for ticalc.org (command line tool to access it)
Memory Usage: a tool for the 89 to show your memory usage
Back to top
souvik1997


Guru-in-Training


Joined: 19 Apr 2010
Posts: 2867

Posted: 13 Jul 2011 09:37:45 pm    Post subject:

That looks pretty nice, TC01. Smile I wish I had a 89 so I could test this out.
_________________
CALCnet Tournament-38%


deviantArt
Back to top
TC01


Member


Joined: 28 Jul 2010
Posts: 170

Posted: 14 Jul 2011 09:31:37 pm    Post subject:

So: I had memusage sitting in my 89's RAM. About ten minutes ago I archived it (because I don't usually keep anything in RAM).

It had worked perfectly before this, but then it began crashing, like it was before. I didn't know what caused it: so I did a RAM clear and resent the program. That didn't fix it.

Then I did a system garbage collect: and this fixed it.

I have no idea why too much memory in garbage (and it wasn't that much from what I could tell) would cause a problem. But all I can say is: if you experience unstable behavior, try a garbage collect. There are programs on ticalc.org that will let you force one: and in the next version I'm going to add an option to do it.

EDIT: Okay, this might not actually be related to a garbage collect. Still, as each time I've tried this it works alright until I archive it: Don't archive it.
_________________
Solar89: A 68k Dev Tool for z80 Basic
renamr68k: Utility script for 68k development
Package manager for ticalc.org (command line tool to access it)
Memory Usage: a tool for the 89 to show your memory usage
Back to top
TC01


Member


Joined: 28 Jul 2010
Posts: 170

Posted: 28 Jul 2011 02:38:56 pm    Post subject:

I've released version 0.3.

As bugs were still happening on my 89, I went back and fixed them. (The fix entailed changing the way the program determined the size of files). The new way is more optimized, and bug free. Smile

I also added an option to garbage collect to the main menu (because the 89 doesn't let you garbage collect manually), and then added information about whether a flash app is "marked for delete" to it's info page. (You currently can't delete flash apps from this interface, so it should always read "0").
_________________
Solar89: A 68k Dev Tool for z80 Basic
renamr68k: Utility script for 68k development
Package manager for ticalc.org (command line tool to access it)
Memory Usage: a tool for the 89 to show your memory usage
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 59259

Posted: 28 Jul 2011 04:05:10 pm    Post subject:

Oooh, glad to see that you're continuing to maintain this! We unfortunately don't have that many 68k users, but every little bit of activity on that front helps in the long run. I'm surprised that the 68ks don't expose any manual way to Garbage Collect.
_________________


Back to top
TC01


Member


Joined: 28 Jul 2010
Posts: 170

Posted: 20 Mar 2012 09:46:59 pm    Post subject:

I've released version 0.4.

The main thing I added was a file info page. A dialog similar to the flash app one pops up when you select a specific file to view showing the size, type, and archival status of that file. Also, if the file is an assembly program and there is associated metadata, that will be displayed too in a separate dialog window.

For some reason, this wasn't in the Cemetech archives- an oversight which has now been cleared up.
_________________
Solar89: A 68k Dev Tool for z80 Basic
renamr68k: Utility script for 68k development
Package manager for ticalc.org (command line tool to access it)
Memory Usage: a tool for the 89 to show your memory usage
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 59259

Posted: 20 Mar 2012 09:48:56 pm    Post subject:

Glad you fixed that oversight, and looking at your list of projects once again reminded me that I need to return to working on Sandpaper. :S Great job with this, though!
_________________


Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

Go to Registration page
   
View previous topic :: View next topic  
Page 1 of 1 All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2014 Cemetech & Kerm Martian :: Page Execution Time: 0.036170 seconds.