You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/05/02 19:05:28 UTC

[incubator-nuttx] branch master updated: RISC-V: Fix bug in riscv_addrenv.c

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2fd29b6408 RISC-V: Fix bug in riscv_addrenv.c
2fd29b6408 is described below

commit 2fd29b640856a88bae926f2e40d439ce064b639a
Author: Ville Juven <vi...@unikie.com>
AuthorDate: Fri Apr 29 09:43:00 2022 +0300

    RISC-V: Fix bug in riscv_addrenv.c
    
    Need 1 full page extra for heap, not 1 byte.
---
 arch/risc-v/src/common/riscv_addrenv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/risc-v/src/common/riscv_addrenv.c b/arch/risc-v/src/common/riscv_addrenv.c
index dc185b4456..a890366106 100644
--- a/arch/risc-v/src/common/riscv_addrenv.c
+++ b/arch/risc-v/src/common/riscv_addrenv.c
@@ -385,7 +385,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize,
 
   /* Allocate 1 extra page for heap, temporary fix for #5811 */
 
-  heapsize = heapsize + MM_NPAGES(1);
+  heapsize = heapsize + MM_PGALIGNUP(1);
 
   /* Map the reserved area */