op_dist_unload()
Abstract
Releases the memory used by a distribution.
Syntax
op_dist_unload (dist_ptr)
| Argument | Type | Description |
|---|---|---|
dist_ptr |
Distribution* |
Pointer to the loaded distribution. |
Return Type
void
No return value.
Example
/* load distribution modeling delay time */
time_dist_ptr = op_dist_load ("uniform", 0.0, MAX_DELAY_TIME);
...
...
...
/* delay-time distribution no longer needed, so free memory */
op_dist_unload (time_dist_ptr);
...
...
/* Now time_dist_ptr points to a new distribution */
time_dist_ptr = op_dist_load ("uniform", 0.0, MAX_BUSY_WAIT_TIME);
Details
None.
Purpose
Provides a mechanism for freeing memory used by a distribution. You can create a distribution by calling op_dist_load(); Once this distribution is no longer needed, you can release it by calling op_dist_unload().
Errors
- Recoverable Error: Distribution pointer is NIL.
Reference
- Use the KP op_dist_load() to load a probability distribution