Function

GLibByteArraysized_new

Declaration [src]

GByteArray*
g_byte_array_sized_new (
  guint reserved_size
)

Description [src]

Creates a new GByteArray with reserved_size bytes preallocated. This avoids frequent reallocation, if you are going to add many bytes to the array. Note however that the size of the array is still 0.

Parameters

reserved_size

Type: guint

Number of bytes preallocated.

Return value

Type: An array of guint8

The new GByteArray.

The caller of the function takes ownership of the data, and is responsible for freeing it.