You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/09/27 18:46:34 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #1852: sysconf: add _SC_PAGESIZE sysconf support

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 the PAGE in the PAGE memory pool (mm/mm_gran/mm_pginitialize.c).   That page size is indicated by CONFIG_MM_PGSIZE.
   
   
   
   
   




----------------------------------------------------------------
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:
users@infra.apache.org