From 78312fa0c5497b089bb82e55ebe50ac6b8ce4bf9 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Tue, 24 Apr 2012 11:23:03 +0200 Subject: common: memory: fix off-by-one in tlsf_create Signed-off-by: Marc Kleine-Budde Signed-off-by: Sascha Hauer --- common/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/memory.c') diff --git a/common/memory.c b/common/memory.c index faff33b419..3b4a5ef4b3 100644 --- a/common/memory.c +++ b/common/memory.c @@ -58,7 +58,7 @@ void mem_malloc_init(void *start, void *end) malloc_end = (unsigned long)end; malloc_brk = malloc_start; #ifdef CONFIG_MALLOC_TLSF - tlsf_mem_pool = tlsf_create(start, (char *)end - (char *)start); + tlsf_mem_pool = tlsf_create(start, end - start + 1); #endif } -- cgit v1.2.3