I've recently started having an issue where my TI 84 Plus CE wont store appvars into the Archive because it 'doesn't have enough space' even though the memory management menu shows that it clearly has more than enough Archive space for it.

For example, I tried to send over a 38kb Appvar using TI Connect CE while my calculator had roughly 300KB of Archive space left. The moment I tried to send it over the calculator started defragmenting (took like, 2 minutes) then gave a memory error. I can send the same file over to the RAM, but I have the same issue when trying to Archive it on-calc.

RAM resetting doesn't fix it, Garbage collecting doesn't fix it, not even reinstalling the OS. I had this issue a few weeks ago and it was fixed by clearing all the memory of the calculator then resending a backup of all my stuff. If this issue occurred every few months or so I wouldn't mind, but since it's acting up every week, I'd like to know what's going on with my calculator.

(Click image for full resolution)

P.S. I ran a FLASH self-test and it said FLASH PASS so I'm pretty sure the FLASH is ok.
Is there any possibility that the number and sizes of the variables already stored in the archive are such that even after defragmenting there isn't a contiguous space big enough for a 38kb item? (If it's like the 68K calcs, it might not be able to store a single variable where it would cross sector boundaries.)

This might be a good use case for some kind of debugging utility that can let the user see all the blocks in the archive and how they relate to the sectors and free space and such.
Maybe App Variables can be up to 32 KB, instead of 64 KB? Onestly, I am just making a guess.
[tev] wrote:
The 89/92+/V200 series has a bad habit of showing “total” archive space instead of the (more useful) metric of largest contiguous space, which can result in not being able to archive something even when there appears to be enough space

This appears to be the case with the CE as well. Sad

[#] [MateoC] wrote:
Since the appvars are so large, [defragmenting] can't move [the appvars] to better locations
So basically, since sending smaller Archived variables works fine, the problem is my appvars are too big.

The solution: rework how my HDPIC program manages Appvars! Woo. Neutral
Just a brief explanation on flash memory for the benefit of anyone who has a problem like this and finds this thread in the future:

The flash memory has a limited erase/write cycle, so it's desirable to keep the number of erasures to a minimum. When a variable is archived, the OS searches for a region of the archive that is large enough for it to fit and writes it there. But flash sectors are 64K and variables cannot cut across sectors (I'm assuming; someone correct me is this is different on 84+CE!), so this places certain restrictions on where the variable can be written.

If a variable is unarchived, it isn't erased right away but simply marked for later deletion. As variables are archived and unarchived, the amount of empty archive space diminishes, until finally the OS cannot find a region large enough to archive a variable. This is when it prompts the user to garbage collect the archive memory, at which point it purges all variables marked for deletion, rearranges what's left, and then tries again to find a place to store the new variable.

If there still isn't a contiguous region of free space for the variable after garbage collection, the archiving operation will fail. This is why it's possible to get an error that there isn't enough space when it appears there is. When the OS shows the amount of space free, it's only showing the total size of all empty and marked-for-deletion regions in the archive. But since in fact only regions which are large enough for the variable are actually usable when archiving, archiving will still fail if none of the existing free spaces are of a suitable size.
I'd like to add that there's only about 50 user flash sectors. No variable can cross sector boundaries. Consequently, a single sector can only hold one variable larger than 32 K. Consequently, you can have a maximum of 50ish variables larger than 32 K. While 50 33 K variables only takes about 1.5 MB, you still couldn't add a 51st even though you could still have 1.5 MB more free space.
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
Page 1 of 1
» All times are UTC - 5 Hours
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