gre_io_size_buffer

gre_io_serialized_data_t* gre_io_size_buffer(
    gre_io_serialized_data_t *    buffer,  
    int                           nbytes  
)
            

This function ensures that the specified buffer has enough internal storage capacity for a payload of nbytes size. If the buffer is NULL or the existing capacity is not large enough then a new memory buffer will be assigned to the buffer object.

Data parameters must be sent in order of descending alignment requirements. Example: 4u1 4u1 2u1 1s0 is good, 2u1 4u1 4u1 1s0 is not


Parameters:
        buffer  The buffer to be sized, or NULL to allocate a new buffer  
        nbytes  The number of bytes this buffer should be able to support  

Returns:
layer_name
        A buffer with room for a message nbytes in size or NULL if the space could not be allocated