patacongo commented on a change in pull request #1852:
URL: https://github.com/apache/incubator-nuttx/pull/1852#discussion_r495602554



##########
File path: libs/libc/unistd/lib_sysconf.c
##########
@@ -241,6 +241,14 @@ long sysconf(int name)
         return 1;
 #endif
 
+      case _SC_PAGESIZE:
+#ifdef CONFIG_MM_PGSIZE
+        return CONFIG_MM_PGSIZE;
+#else
+#define PAGESIZE 4096

Review comment:
       > 
   > 
   > Maybe I do not understand if there is no MMU why are we providing this 
interface.
   
   PAGESIZE does matter in the KERNEL build where the MMU is used.  MMUs 
support various pages sizes.  This depends on hardware and cannot be controlled 
via configuration.  I think you need the size of the PAGE in the PAGE memory 
pool (mm/mm_gran/mm_pginitialize.c).   That page size is indicated by 
CONFIG_MM_PGSIZE.
   
   Sometimes useless definitions are provided to support Linux compatibility.
   
   
   
   
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to