This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rtems] PAGESIZE versus PAGE_SIZE


Going through RTEMS Bugzilla, I came across an
old PR about PAGESIZE and PAGE_SIZE having
different values for RTEMS. RTEMS does not have
virtual memory so the actual value doesn't mean

As best I can tell it is easy to fix since both
are in RTEMS specific areas of newlib. It is
just a matter of picking which one to change.
And is it possible/desirable for limits.h or
param.h to include the other?

PAGESIZE in defined in newlib/libc/sys/rtems/include/limits.h

#define PAGESIZE 1

NOTE: Acceptable per Open Group but these are supposed to

PAGE_SIZE is defined in newlib/libc/sys/rtems/machine/param.h.

#define PAGE_SHIFT      12              /* LOG2(PAGE_SIZE) */
#define PAGE_SIZE       (1<<PAGE_SHIFT) /* bytes/page */

The dirtiest solution is to fix limits.h to have 4096
and add a comment that it must match the one in param.h.

What is the right thing to do to fix this?

Joel Sherrill, Ph.D.             Director of Research & Development        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
  Support Available             (256) 722-9985

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]