Function gnunet_sys::GNUNET_buffer_prealloc[][src]

pub unsafe extern "C" fn GNUNET_buffer_prealloc(
    buf: *mut GNUNET_Buffer,
    capacity: usize
)

Initialize a buffer with the given capacity.

When a buffer is allocated with this function, a warning is logged when the buffer exceeds the initial capacity.

@param buf the buffer to initialize @param capacity the capacity (in bytes) to allocate for @a buf