<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 22/10/2016 16:42, Brian Paul wrote:<br>
    </div>
    <blockquote
cite="mid:CAEUUzO9RX9LSgf9SiyNiAqx48jb+M6XFsbmyuS+1dA1m9fWBRQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">On Sat, Oct 22, 2016 at 4:28 AM, Axel Davy <span
          dir="ltr"><<a moz-do-not-send="true"
            href="mailto:axel.davy@ens.fr" target="_blank">axel.davy@ens.fr</a>></span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Add
              implementation for align_calloc,<br>
              which is align_malloc + memset.<br>
              <br>
              Signed-off-by: Axel Davy <<a moz-do-not-send="true"
                href="mailto:axel.davy@ens.fr">axel.davy@ens.fr</a>><br>
              ---<br>
               src/gallium/auxiliary/util/u_<wbr>memory.h | 7 +++++++<br>
               1 file changed, 7 insertions(+)<br>
              <br>
              diff --git a/src/gallium/auxiliary/util/<wbr>u_memory.h
              b/src/gallium/auxiliary/util/<wbr>u_memory.h<br>
              index 597df62..c72d19f 100644<br>
              --- a/src/gallium/auxiliary/util/<wbr>u_memory.h<br>
              +++ b/src/gallium/auxiliary/util/<wbr>u_memory.h<br>
              @@ -63,6 +63,13 @@ extern "C" {<br>
               #define align_malloc(_size, _alignment)
              os_malloc_aligned(_size, _alignment)<br>
               #define align_free(_ptr) os_free_aligned(_ptr)<br>
              <br>
              +static inline void *<br>
              +align_calloc(size_t size, unsigned long alignment)<br>
              +{<br>
              +    void *ptr = align_malloc(size, alignment);<br>
            </blockquote>
            <div><br>
                if (ptr)<br>
               <br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">+   
              memset(ptr, 0, size);<br>
              +    return ptr;<br>
              +}<br>
              <br>
               /**<br>
                * Duplicate a block of memory.<br>
              <span class="HOEnZb"><font color="#888888">--<br>
                  <br>
                </font></span></blockquote>
            <div><br>
            </div>
            <div>-Brian<br>
               <br>
            </div>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <p>Indeed, thanks !</p>
    <p><br>
    </p>
    <p>Axel<br>
    </p>
  </body>
</html>