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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux