### Function

# GLib Array sized_new

#### Declaration [src]

    GArray*
    g_array_sized_new (
      gboolean zero_terminated,
      gboolean clear_,
      guint element_size,
      guint reserved_size
    )

#### Description [src]

Creates a new `GArray` with `reserved_size` elements preallocated and a reference count of 1. This avoids frequent reallocation, if you are going to add many elements to the array. Note however that the size of the array is still 0.

This function is not directly available to language bindings.

#### Parameters

`zero_terminated`

  Type: `gboolean`

  `TRUE` if the array should have an extra element at the end with all bits cleared.

`clear_`

  Type: `gboolean`

  `TRUE` if all bits in the array should be cleared to 0 on allocation.

`element_size`

  Type: `guint`

  Size of each element in the array.

`reserved_size`

  Type: `guint`

  Number of elements preallocated.

#### Return value

Type: An array of `gpointer`

The new `GArray`.

The data is owned by the called function.