diff --git a/LAPACKE/include/lapacke.h b/LAPACKE/include/lapacke.h index 8f63371ab..a6a33673f 100644 --- a/LAPACKE/include/lapacke.h +++ b/LAPACKE/include/lapacke.h @@ -45,11 +45,11 @@ extern "C" { /** \brief Allocate through the installed allocator (malloc by default). */ void *LAPACKE_malloc_proxy(size_t size); + /** \brief Release through the installed deallocator (free by default). */ void LAPACKE_free_proxy(void *ptr); -/** \brief Install a custom allocator: malloc_fn / free_fn must form a - * matching pair; NULL restores the defaults. Mutates global state and is - * not thread-safe. */ + +/** \brief Install a custom allocator for LAPACKE-internal allocations. */ void LAPACKE_set_alloc(void *(*malloc_fn)(size_t), void (*free_fn)(void *)); #ifndef LAPACKE_malloc diff --git a/LAPACKE/src/lapacke_alloc.c b/LAPACKE/src/lapacke_alloc.c index e19d1257e..96b6ae5d4 100644 --- a/LAPACKE/src/lapacke_alloc.c +++ b/LAPACKE/src/lapacke_alloc.c @@ -16,7 +16,7 @@ static void *(*lapacke_malloc_fn)(size_t) = malloc; static void (*lapacke_free_fn)(void *) = free; /** - * \brief Allocate memory through the installed allocator. + * \brief Allocate through the installed allocator (malloc by default). * * Default of the LAPACKE_malloc macro. * @@ -29,7 +29,7 @@ void *LAPACKE_malloc_proxy(size_t size) } /** - * \brief Release memory through the installed deallocator. + * \brief Release through the installed deallocator (free by default). * * Default of the LAPACKE_free macro. *