aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/oslib/include
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-11-20 18:28:56 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-11-20 18:28:56 +0000
commitc010f378caa66e18145d94e35a7123e9209f46d1 (patch)
treea66a751caca281af3a651ebc343d3334df9f8ab4 /os/common/oslib/include
parentce79109195102580ac192f3f70cc2d30332911c6 (diff)
downloadChibiOS-c010f378caa66e18145d94e35a7123e9209f46d1.tar.gz
ChibiOS-c010f378caa66e18145d94e35a7123e9209f46d1.tar.bz2
ChibiOS-c010f378caa66e18145d94e35a7123e9209f46d1.zip
Fixed bug #804.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11046 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/oslib/include')
-rw-r--r--os/common/oslib/include/chheap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/common/oslib/include/chheap.h b/os/common/oslib/include/chheap.h
index 7c85efe7f..6cce85b3c 100644
--- a/os/common/oslib/include/chheap.h
+++ b/os/common/oslib/include/chheap.h
@@ -173,7 +173,7 @@ static inline void *chHeapAlloc(memory_heap_t *heapp, size_t size) {
*/
static inline size_t chHeapGetSize(const void *p) {
- return ((heap_header_t *)p)->used.size;
+ return ((heap_header_t *)p - 1U)->used.size;
}
#endif /* CH_CFG_USE_HEAP == TRUE */