Skip to content
  • Ell's avatar
    utils: reduce size overhead of gegl_malloc() · 18ab54ed
    Ell authored
    gegl_malloc() stores a pointer to the real malloc-ed buffer in front
    of the returned buffer, requiring sizeof(gpointer) bytes on top of
    GEGL_ALIGN.  Since the value of GEGL_ALIGN (16) easily fits in a
    single byte, we can replace this pointer with a single-byte offset
    to the real start of the buffer.  Since the offset from the real
    start of the buffer to the returned buffer is at least 1, we don't
    need to allocate any additional space on top of GEGL_ALIGN.
    18ab54ed