Ejemplo n.º 1
0
void *FDKaalloc_L(const UINT size, const UINT alignment, MEMORY_SECTION s)
{
  void *addr, *result=NULL;
  addr = FDKcalloc_L(1, size + alignment + sizeof(void*), s);       /* Malloc and clear memory.         */

  if (addr!=NULL)
  {
    result = ALIGN_PTR((unsigned char *)addr + sizeof(void*));    /* Get aligned memory base address. */
    *(((void**)result) - 1) = addr;                /* Save malloc'ed memory pointer.   */
  }

  return result;                                 /* Return aligned address.          */
}
Ejemplo n.º 2
0
void *fdkCallocMatrix1D_int(UINT dim, UINT size, MEMORY_SECTION s) {
  return FDKcalloc_L(dim, size, s);
}