Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Управление Памятью    >>    psxmh103
   
 
 Pure Power XMS Heap 1.03 for Turbo Pascal 6.0   Michael Gallias 08.01.1993

Модуль для создания дополнительной "кучи" в XMS памяти, что позволяет увеличить суммарный объем динамической памяти, отводимой для программы.
This unit gives the pascal programmer an access to an XMS heap for Pascal. It uses a similar system to the Pascal standard heap. This unit is ideal for programmers requiring many large blocks of data.



8k 
 

Overview This unit gives the pascal programmer access to an XMS heap for Pascal. It uses a similar system to the Pascal standard heap. This unit is ideal for programmers requiring many large blocks of data. Requirements Turbo Pascal 6 TPXMS.TPU (Public Domain by Vernon E. Davis, Jr.) DosMem (Public Domain by Pure Power Software, PSDSM) Both PSDSM and TPXMS should be available where you obtained this file. Limitations When running in real mode you cannot simply use the XMS memory provided by HIMEM.SYS with pointers. Thus you can't simply plug in this unit and assume that your programs will now use XMS. You can only access data in conventional memory. Thus if your program uses 400 kb and the PC only had 500 kb free, your program is still limited to a largest block size of 100 kb, but with this unit you can swap data in and out of the XMS memory. How it works HIMEM requires a request for memory. Usually HIMEM only permits 32 blocks, that is, only 32 handles are issued. Thus requesting a new handle each time is silly as one often uses more than 32 pointers in a program, often more than the 128 HIMEM maximum. So, when you allocate your XMS heap with GetXMSHeap, the unit takes a block (one handle) from HIMEM. You can then access this memory in any size chunks you wish, from blocks of 1 byte to blocks of 640 kb. The unit has its own handles and can allocate many handles to the XMS heap (set by BMaxPointersB). Your programs will now use handles to the XMS heap (not to XMS controlled by HIMEM), not only pointers. Handles point to the XMS heap, p