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/28 10:14:27 UTC

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

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



##########
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:
       One minor "nit" This does not follow the normal file format for preprocessor information. [This belongs at the top of the file](
   https://github.com/apache/incubator-nuttx/blob/b860150d22473f2400398382fbe78162bd5a49d0/libs/libc/unistd/lib_sysconf.c#L248) with the CONFIG as an override. 
   
   Is all this controlled by a Kconfig knob to turn it off on small systems or are we relying on the linker to garbage collect? 
   
   I remember a time, where we could not even enable debug features in saved defconfig, so that the images created out to the box showed of NuttX's compact size while still being totally scaleable.




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