summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/memheap.c2
-rw-r--r--src/module.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/memheap.c b/src/memheap.c
index e19c83a08c..adb5c86053 100644
--- a/src/memheap.c
+++ b/src/memheap.c
@@ -517,6 +517,8 @@ void rt_memheap_free(void *ptr)
/* check magic */
RT_ASSERT((header_ptr->magic & RT_MEMHEAP_MASK) == RT_MEMHEAP_MAGIC);
+ /* check whether this block of memory has been over-written. */
+ RT_ASSERT((header_ptr->next->magic & RT_MEMHEAP_MASK) == RT_MEMHEAP_MAGIC);
/* get pool ptr */
heap = header_ptr->pool_ptr;
diff --git a/src/module.c b/src/module.c
index 5d5d02c580..1c20de731d 100644
--- a/src/module.c
+++ b/src/module.c
@@ -82,7 +82,7 @@ static struct rt_module_symtab *_rt_module_symtab_end = RT_NULL;
*/
int rt_system_module_init(void)
{
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__CC_ARM)
extern int __rtmsymtab_start;
extern int __rtmsymtab_end;