DOS/4G

Tenberry Home

Consulting Services

Order DOS/4G

DOS/4G FAQ

Release Notes

DPMI Spec

* * *

DOS/4GW

DOS/4GW Pro

DOS/4G
for Watcom

DOS/16M

DOS/4G and DOS/4GW FAQ:
File I/O


[Previous Section] * [Index of FAQ] * [Next Section]
  1. Do you have any suggestions for speeding up file I/O?

1. Do you have any suggestions for speeding up file I/O?

The best way to speed up DOS file I/O in DOS/4G is to write large blocks (up to 65535 bytes, or the largest number that will fit in a 16-bit int) at a time from a buffer in low memory. In this case, DOS/4G has to copy the least amount of data and make the fewest number of DOS calls in order to process the I/O request.

Low memory is allocated through Interrupt 31h/0100h (Allocate DOS Memory Block). You can convert the real mode segment address returned by Interrupt 31h/100h to a pointer (suitable for passing to setvbuf()) by shifting it left four bits.


[Previous Section] * [Index of FAQ] * [Next Section]
Last modified 2003.02.06. Your questions, comments, and feedback are welcome.