PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

'disk' memory vs. allocated memory

BurningScrappy · 10 Mar 2003, 04:41 UTC
Just a thought I had while I was working with my sound manager. A handheld device technically doesn't have a 'hard disk', so when performing I/O and memory allocation, is I/O from a 'file' the same speed as I/O from allocated memory? Anyone done any kind of research into this, just brings up the question of buffers, streaming a file from the 'disk' versus loading the full file in memory and then accessing it.

Questions/Comments/Complaints?
Well, remember that the file is likely to be on a storage card, in which case speed would drop dramatically.
BurningScrappy · 10 Mar 2003, 04:56 UTC
What's the overhead for I/Oing off a storage card? All my test equipment (various ipaqs and a couple of other handhelds i managed to get my grubby hands on) just have either 32/64mb memory. Haven't experimented with storage cards. Are there programm installation differences? I just use the ezsetup/cab creator method for my titles, will I have to change things to appease the users that want their programs stored on a card? Right now my goal is to have all titles I release to keep the footprint at either 3mb's or smaller, including resources, which means data packing and such. That kind of methodology won't work if storage cards are dramatically slow.

Questions/Comments/Complaints?
Well with allocated memory you already have the relavent information located and stored for easy retrieval, with 'disk' access the device still has to located the file. Allocation also allows you, the programmer, to easily work with the file in your code... atleast that would be my take on the situation.
Don't forget that Flash RAM has a relatively low number of writes before the media "wears out". It is in the hundreds of thousands, but if you are using a CF card for a temp file, then you could easily write to a single sector that many times in short order, which would cause that sector to fail. There is no issue with reading.

Dan East
Dan: Was reading up on the Familiar Linux threads, one which showed concern for the fact Flash ROM is constantly read and written to. I'd like to find the exact response, (I found one, but it's not quite what I wanted) which states 100000 writes per sector before the sector fails. Depending on the file system used, it may spread the writes around, like JFFS2 does. If you have a 32MB ROM, once again IIRC, you'll be able to write 3.1TB before the memory is fried (if you don't write on the same sector anytime)

My point is that a cause for concern about Flash wearing out isn't needed in most cases, though for temp files, I agree, and would suggest something else.

Just a nitpick though.

-sponge