### Function Macro

# GLib newa

#### Declaration

    #define g_newa (
      struct_type,
      n_structs
    )

#### Description

Wraps `g_alloca()` in a more typesafe manner.

As mentioned in the documentation for g_alloca(), `n_structs` must always be entirely under the control of the program, or you may introduce a denial of service vulnerability. In addition, the multiplication of `struct_type` by `n_structs` is not checked, so an overflow may lead to a remote code execution vulnerability.

This function is not directly available to language bindings.

#### Parameters

`struct_type`

  Type: `-`

  Type of memory chunks to be allocated.

`n_structs`

  Type: `-`

  Number of chunks to be allocated.