community.borland.com

Article #15958: ACCESSING MORE THAN 64K OF DATA

 Technical Notes Database

TN958D.txt   ACCESSING MORE THAN 64K OF DATA
Category   :Pascal
Platform    :All
Product    :Turbo Pascal  4.0+

Description:
Q. I need my program to work with more than 64K of data at a time.  How
  can I use large data structures in my Turbo Pascal programs?
A. You would use heap space for your larger data structures.  Instead of
  declaring variables to be large arrays, records, or arrays of records,
  declare these variables to be pointers to your data structures and reserve
  space for them with procedures NEW or GETMEM.  The space reserved for
  this data will not reside in the normal data segment but rather in heap
  space where each data structure may occupy up to 64K.

  If you need even more memory, use typed files to store your data.
  Storage is limited only by the capacity of your drive system.  The
  SEEK procedure can be used to index into the file as though it were
  a large array out on disk.  This technique is often the only option
  when memory consumption must be kept to a minimum. However, accessing
  data on disk is slower than accessing data in RAM memory.


Reference:


7/16/98 4:35:37 PM
 

Last Modified: 01-SEP-99