1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#include <stdlib.h>
#include <stdio.h>
#include "stddef.h"
#include "fftw3.h"
void* ltfat_malloc (size_t n)
{
void *outp;
outp = fftw_malloc(n);
if (outp == NULL)
{
puts("ltfat_malloc failed.");
exit(1);
}
return outp;
}
void* ltfat_realloc (void *ptr, size_t n)
{
void *outp;
outp = realloc(ptr, n);
if (outp == NULL)
{
puts("ltfat_realloc failed.");
exit(1);
}
return outp;
}
void* ltfat_calloc (size_t nmemb, size_t size)
{
void *outp;
outp = calloc(nmemb, size);
if (outp == NULL)
{
puts("ltfat_calloc failed.");
exit(1);
}
return outp;
}
void ltfat_free(void *ptr)
{
fftw_free(ptr);
}
|