"Not enough heap memory"


Author Message
bfwolf
Senior Member

Joined: 03/01/2025
Location: Germany
Posts: 243
Posted: 08:33am 03 Apr 2026      

  Mixtel90 said  If you need vast amounts of RAM for a database then you and your AI friend are doing something wrong. ;)

CP/M could run some pretty big databases under dBASE II (65535 records IIRC)  with less than 60k.


I completely agree with you! AI is indeed "quite naive" in many respects.

To manage large datasets, it would certainly be better to keep only a portion of the data in RAM — for example, in a "window" buffering the current position of the table being processed. Or a more intelligent cache that can buffer multiple areas using an LRU strategy. Nevertheless, it's crucial to remember that the number of write operations on flash filesystems must be minimized. Unlike magnetic storage media or RAM, they don't survive an unlimited number of writes — not to mention that writes on flash are very slow. With magnetic storage media, writes are only "imperceptibly slower" and practically unlimited.

And of course, there are other conceivable use cases where a lot of information needs to be stored in RAM. Therefore, it would be fantastic to be able to control whether slow or fast RAM should be prioritized for specific variables. As an application programmer, you can assess whether certain variables are speed-critical or not.

  Mixtel90 said  It's been a long time, but I don't think you ever had more than the core routines, the current sort routine and the sorted index file in RAM at the same time normally. You don't even have the whole program in RAM at once. All the data and the overlaid commands were on disk (but you had a 32MB hardware limit!).

Ok, 65535 records is probably a bit puny for some now, but it was very big at the time. And a Z80 couldn't count past &hFFFF in a register pair. :)


Code overlays were one of the reasons why many programs were so terribly slow back then.  I'll just mention the C64 with its floppy drive and the sluggish IEC serial bus. Of course, you were often just glad it worked at all.

bfwolf