diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 3aac4c6228..227ef8f720 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -760,6 +760,18 @@ FAR void *up_textheap_memalign(size_t align, size_t size); void up_textheap_free(FAR void *p); #endif +/**************************************************************************** + * Name: up_textheap_heapmember + * + * Description: + * Test if memory is from text heap. + * + ****************************************************************************/ + +#if defined(CONFIG_ARCH_USE_TEXT_HEAP) +bool up_textheap_heapmember(FAR void *p); +#endif + /**************************************************************************** * Name: up_dataheap_memalign * @@ -784,6 +796,18 @@ FAR void *up_dataheap_memalign(size_t align, size_t size); void up_dataheap_free(FAR void *p); #endif +/**************************************************************************** + * Name: up_dataheap_heapmember + * + * Description: + * Test if memory is from data heap. + * + ****************************************************************************/ + +#if defined(CONFIG_ARCH_USE_DATA_HEAP) +bool up_dataheap_heapmember(FAR void *p); +#endif + /**************************************************************************** * Name: up_copy_section *