Memory Management and File Handling

The DP4 library contains a number of memory management functions that can give improved performance. They fall into three categories which are described in this Section:

File handling functions

DP4 also has two families of functions for reading and writing files. They differ only in whether the file in question is accessed via the database manager , hence possibly on a remote machine, (the sf_() familiy of functions) or locally via the terminal manager, the (tf_() familiy). These functions use DP4's own file caching mechanism in those programs, which can improve performance (though this is less of a consideration on modern operating systems.)

Traditionally several of these functions used or returned quantities that were of type long, and then unsigned long, which meant they did not work with very large files or disks. As of release 4.622 both 32 bit and 64 bit versions of all these functions are available. In this manual such parameters or return types are all described as file_pointer. You can enable the 64 bit version of the functions by including the following #define in your C code becore including dp4capi.h:

#define USE_DP5_FILEHANDLING 1