Copyright (C) 2000-2012 |
GNU Info (fftw.info)Memory Allocator ReferenceMemory Allocator Reference ========================== #include <fftw.h> void *(*fftw_malloc_hook) (size_t n); void (*fftw_free_hook) (void *p); Whenever it has to allocate and release memory, FFTW ordinarily calls `malloc' and `free'. If `malloc' fails, FFTW prints an error message and exits. This behavior may be undesirable in some applications. Also, special memory-handling functions may be necessary in certain environments. Consequently, FFTW provides means by which you can install your own memory allocator and take whatever error-correcting action you find appropriate. The variables `fftw_malloc_hook' and `fftw_free_hook' are pointers to functions, and they are normally `NULL'. If you set those variables to point to other functions, then FFTW will use your routines instead of `malloc' and `free'. `fftw_malloc_hook' must point to a `malloc'-like function, and `fftw_free_hook' must point to a `free'-like function. automatically generated by info2www version 1.2.2.9 |