xiaoxiang781216 commented on code in PR #15527:
URL: https://github.com/apache/nuttx/pull/15527#discussion_r1914277905


##########
arch/risc-v/src/common/riscv_addrenv.c:
##########
@@ -415,7 +415,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, 
size_t heapsize,
   resvbase = CONFIG_ARCH_DATA_VBASE;
   resvsize = ARCH_DATA_RESERVE_SIZE;
   textbase = CONFIG_ARCH_TEXT_VBASE;
-  database = resvbase + MM_PGALIGNUP(resvsize);
+  database = resvbase + MM_PGALIGNUP(resvsize) + ARCH_DATA_RESERVE_SIZE;

Review Comment:
   but resvisze alredy contin ARCH_DATA_RESERVE_SIZE?



##########
libs/libc/modlib/gnu-elf.ld.in:
##########
@@ -26,7 +26,7 @@
 #  include <nuttx/addrenv.h>
 
 #  define TEXT CONFIG_ARCH_TEXT_VBASE
-#  define DATA CONFIG_ARCH_DATA_VBASE + ARCH_DATA_RESERVE_SIZE
+#  define DATA CONFIG_ARCH_DATA_VBASE + CONFIG_MM_PGSIZE + 
ARCH_DATA_RESERVE_SIZE

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to