Go to the first, previous, next, last section, table of contents.


3.2.2 diskheap_set_sync_often -- When to Sync Administrative Information

Function:
int diskheap_set_sync_often(diskheap_t * diskheap_p, const int sync_header, const int sync_free);

Usage: ret = diskheap_set_sync_often(diskheap_p, 10000, 10000);

This function sets how many Diskheap transactions must occur before the header and free-list administrative information should be written to disk. This administrative information needs to be up-to-date and should be updated every once in a while in case your program exits unexpectantly and does not close the Diskheap properly. You can set either argument to 0 to have the sync never happen unless you call the diskheap_sync_header and diskheap_sync_free_list functions. It will return DISKHEAP_ERROR_NONE if it succeeds otherwise an error code.


Go to the first, previous, next, last section, table of contents.

Diskheap Home Page. Copyright 2002 by Gray Watson