Updated: April 19, 2023 |
Deallocate an iofunc Open Control Block's memory
#include <sys/iofunc.h> void iofunc_ocb_free( iofunc_ocb_t * ocb );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The iofunc_ocb_free() function returns the memory allocated to an iofunc OCB to the free store pool. This function is the complement of iofunc_ocb_calloc().
If you've overridden the definition of iofunc_ocb_calloc(), you should also override the definition of iofunc_ocb_free() to correctly handle the release of the memory. This is because the iofunc_ocb_calloc() function uses an internal memory management function to allocate the memory, and the default iofunc_ocb_free() function also uses this internal function to deallocate memory. Therefore, you can't mix internal memory management functions (_scalloc() and _sfree()) with user-level memory management functions (calloc() and free()).
If you specify iofunc_ocb_free() and iofunc_ocb_calloc() callouts in the attribute's mount structure, then you should use the callouts instead of calling the standard iofunc_ocb_free() and iofunc_ocb_calloc() functions.
See iofunc_ocb_calloc().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |