summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-06 12:49:35 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-06 12:49:35 -0600
commit4c25fe684ac64fec240445ae179dc9fcbe01f1d4 (patch)
treedf036f283e03dc203a710a315712cea8c2e2872e
parent773a23249b1887564edfea51d78a7ab1fd3a7cab (diff)
downloadnuttx-4c25fe684ac64fec240445ae179dc9fcbe01f1d4.tar.gz
nuttx-4c25fe684ac64fec240445ae179dc9fcbe01f1d4.tar.bz2
nuttx-4c25fe684ac64fec240445ae179dc9fcbe01f1d4.zip
Fix a place in the memory manager where it explicitly assumes that the size of a point is 4 bytes. That is OK if the actually size is smaller but makes the heap unstable when used withthe x86_64 host simulation
-rw-r--r--nuttx/include/nuttx/mm/mm.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/nuttx/include/nuttx/mm/mm.h b/nuttx/include/nuttx/mm/mm.h
index 05968f625..707d7f7da 100644
--- a/nuttx/include/nuttx/mm/mm.h
+++ b/nuttx/include/nuttx/mm/mm.h
@@ -204,15 +204,8 @@ struct mm_freenode_s
/* What is the size of the freenode? */
-#ifdef CONFIG_MM_SMALL
-# ifdef CONFIG_SMALL_MEMORY
-# define SIZEOF_MM_FREENODE 8
-# else
-# define SIZEOF_MM_FREENODE 12
-# endif
-#else
-# define SIZEOF_MM_FREENODE 16
-#endif
+#define MM_PTR_SIZE sizeof(FAR struct mm_freenode_s *)
+#define SIZEOF_MM_FREENODE (SIZEOF_MM_ALLOCNODE + 2*MM_PTR_SIZE)
#define CHECK_FREENODE_SIZE \
DEBUGASSERT(sizeof(struct mm_freenode_s) == SIZEOF_MM_FREENODE)