Jim Leonard
2012-07-22 18:02:36 UTC
I'm starting a new hobby project that has a requirement of running in
16-bit DOS. The most elegant way for this project to work with
information internally is a TSortedCollection, but as far as I can
tell, these are limited to using the heap for storage. (They return
pointers to objects, and objects are stored in main RAM on the heap.)
At some point, I will run out of the lower 640K DOS memory to hold all
my objects.
What is the recommended way to get past this? I can't compile to 286
protected mode because I'm working with some pretty hairy inline
assembler (that I CANNOT change) that doesn't work in protected mode.
I could store my objects on an EMS or XMS stream (or even disk if I'm
desperate), but manipulating them (ie. sorting them, insertion/
deletion) could get unacceptably slow. How did people solve
TCollection/Object memory issues in the past?
16-bit DOS. The most elegant way for this project to work with
information internally is a TSortedCollection, but as far as I can
tell, these are limited to using the heap for storage. (They return
pointers to objects, and objects are stored in main RAM on the heap.)
At some point, I will run out of the lower 640K DOS memory to hold all
my objects.
What is the recommended way to get past this? I can't compile to 286
protected mode because I'm working with some pretty hairy inline
assembler (that I CANNOT change) that doesn't work in protected mode.
I could store my objects on an EMS or XMS stream (or even disk if I'm
desperate), but manipulating them (ie. sorting them, insertion/
deletion) could get unacceptably slow. How did people solve
TCollection/Object memory issues in the past?