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


3.5.2 diskheap_seed_random -- Seed the random number generator.

Function:
void diskheap_seed_random(const int seed);

Usage: diskheap_seed_random(time(0L) ^ getpid());

This function seeds the random number generator inside of the diskheap library and sets a static flag which will not cause any more calls to the random seed routine to be made. This should be called before any other diskheap calls are made to be effective. It will return DISKHEAP_ERROR_NONE if it succeeds otherwise an error code.

Note: this is usually only needed in testing since the library auto seeds the random number generator the first time a diskheap is opened or created.


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

Diskheap Home Page. Copyright 2002 by Gray Watson