<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="bson_realloc_ctx">
  <info>
    <link type="guide" xref="memory" group="function"/>
  </info>
  <title>bson_realloc_ctx()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[void *
bson_realloc_ctx (void  *mem,
                  size_t num_bytes,
                  void  *ctx);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p><code>mem</code></p></td><td><p>A memory region.</p></td></tr>
      <tr><td><p><code>num_bytes</code></p></td><td><p>A size_t containing the requested size.</p></td></tr>
      <tr><td><p><code>ctx</code></p></td><td><p>A consumer-specific pointer or <code>NULL</code>.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>This function is identical to <link xref="bson_realloc">bson_realloc()</link> except it takes a context parameter. This is useful when working with pooled or specific memory allocators.</p>
  </section>

</page>
