Function

GLib-2.0GLibtry_realloc

  • Attempts to realloc mem to a new size, n_bytes, and returns null on failure. Contrast with g_realloc(), which aborts the program on failure.

    If mem is null, behaves the same as g_try_malloc().

    Parameters

    • mem: any

      previously-allocated memory, or null.

    • n_bytes: number

      number of bytes to allocate.

    Returns any

    the allocated memory, or null.