Managing Memory Allocations
- Compute the size of the required buffer using thefunction (some functions have<function base name>GetSizeGetBufSizeorGetBufferSizein their name instead ofGetSize).
- Set up any buffers needed for initialization. For more information, see the section Setting up Buffers below.
- Initialize the specification or state structure for the operation usingfunction. For more information about the specification and state structures, see the section Specification and State Structures below.<function base name>Init
- Free the buffers need for initialization only (the ones you set up in step 2).
- Set up working buffers for the main operation. For more information, see the section Setting up Buffers below.
- Do the main operation.
- Free the specification or state buffers that you set up in step 3 and the working buffers that you set up in step 5.