ret = diskheap_set_free_space(diskheap_p, 10240000);
This function sets the amount of disk space to reserve for free-space information. The default is currently 1mb which should be able to store more than 150,000 free slots in the file. Each "free slot" represents a block-number and size (in blocks) of a free area in the diskheap. Contiguous free space is combined so each free area is bounded by allocated areas. It will return DISKHEAP_ERROR_NONE if it succeeds otherwise an error code.
Free slots which cannot be accounted for in this area will not be stored and may be lost however the default settings should make this a rare occurrence.
Note: this call has to be made immediately following the
diskheap_create and no later. Once the file has been
created, it cannot be adjusted.
Go to the first, previous, next, last section, table of contents.
Diskheap Home Page. Copyright 2002 by Gray Watson