[PATCH] fixup! fastboot: scale default sparse max_download_size with available memory

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Aug 25 10:29:39 PDT 2023


mem_malloc_end is the end address, so we need to add one to get the size
out.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
Forgot to squash
---
 include/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/memory.h b/include/memory.h
index 73642dd5aaa5..9c2a037610b6 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -12,7 +12,7 @@ ulong mem_malloc_end(void);
 
 static inline ulong mem_malloc_size(void)
 {
-	return mem_malloc_end() - mem_malloc_start();
+	return mem_malloc_end() - mem_malloc_start() + 1;
 }
 
 struct memory_bank {
-- 
2.39.2




More information about the barebox mailing list