Post Reply 
[Help]Hp 50g : working with larger-than-memory datasets
03-27-2017, 12:21 AM
Post: #4
RE: [Help]Hp 50g : working with larger-than-memory datasets
(03-26-2017 11:11 AM)pier4r Wrote:  The problem:
- At least on the hp50g, a list like this would not be a big problem to store. One has the internal flash available (Port2 on my 50g has still 600kb+ of memory free) or the sd card (mine has still 2gb +). The problem is to use this list for computations, since it cannot fit the ram.

A possible solution:
- I remember I have read something about "packing" data in blocks to work with smaller blocks every time that would fit the ram leaving enough space for computations. This was a technique used for games on older game consoles like PS1, gameboy, nes, that nevertheless are computing systems (also quite powerful).

Another possible solution:
Store your data on a file in the SD card. Then write in C a routine for GET and a routine for PUT that work directly on the SD card (you'd never read the whole file into memory, just the objects you need, and you do so in separate objects, so they can be individually garbage collected.
These are 2 individual programs you can call from your RPL program, that would be the only C you need, the rest is RPL.

(03-26-2017 11:11 AM)pier4r Wrote:  ... but with the newRPL coming (great project!) it will be less work.

As a matter of fact, newRPL has a complete set of SD card file manipulation commands. You can read/write arbitrary objects from files on the SD card, it even has a MODIFY file mode where you can overwrite parts of a file without truncating it, useful if you store records of fixed length, you can literally "edit" the file without ever loading it into memory.
That's with RPL only.
Writing a VMM (Virtual Memory Manager) has always been in the back of my head, to use the SD card as swapping. However, I never coded a single line to make it happen.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [Help]Hp 50g : working with larger-than-memory datasets - Claudio L. - 03-27-2017 12:21 AM



User(s) browsing this thread: 1 Guest(s)