From 1fc3de45189cc45b05fa87abcd0828c34708938f Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Fri, 10 Nov 2023 11:49:19 +0800 Subject: [PATCH] arch/textheap: add _heapmember declare for text and data heap It was accidentally deleted on PR:#11043 Signed-off-by: dongjiuzhu1 --- include/nuttx/arch.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 *