: : : How can I allocate more then 64 kB of heap. I want to save the screen into the memory with pointers. I am using Turbo Pascal 7. I have 320 MB of RAM. I don't think that should be a problem. How would I overcome this problem. Thank you in advance.
: : :
: : :
: : The heap is not limited to 64kB - however, because TP runs under DOS, data blocks are limited to 64kB. You can overcome this by using multiple data blocks and save your screen segmented (search the help for the "getmem" function, if you aren't already using it).
: : As mentioned above, TP is DOS based, which means that you only can use the first MB of your memory (this is because of the SEGMENT:OFFSET memory access type in RealMode/DOSMode). You can access the rest of your memory by using dos-extenders.
: : I suggest using the XMS-Extender is a pretty good way - I had figured out that this is much easier than EMM. If your heap is not big enough for what you are trying to do, then search the web for a XMS-unit/tutorial, there are plenty of 'em out there.
: : hope that helped,
: : tron.
: You could also use the TEMSStream object. I've often created a descendant of that object, which treated the data as an array of records. This way you only have to worry about the memory-management once, and then it is simply a matter of using an array. There is only 1 restriction to this object: it can only handle the first 16 MB.