[Bug 1216] New: PAGESIZE/PAGE_SIZE/sysconf/getpagesize conflicts
rtems-bugs at rtems.org
rtems-bugs at rtems.org
Tue Jan 30 13:17:48 UTC 2007
http://www.rtems.org/bugzilla/show_bug.cgi?id=1216
Summary: PAGESIZE/PAGE_SIZE/sysconf/getpagesize conflicts
Product: RTEMS
Version: 4.7
Platform: All
OS/Version: RTEMS
Status: NEW
Severity: critical
Priority: P3
Component: cpukit
AssignedTo: joel.sherrill at oarcorp.com
ReportedBy: ralf.corsepius at rtems.org
CC: jwillemsen at remedy.nl
http://www.rtems.org/bugzilla/show_bug.cgi?id=1215
has caused me to investigate a bit on "page size" related things in RTEMS.
The result is close to a desaster:
* limits.h contains a hardcoded #define PAGESIZE 1
* sys/params.h contains some magic to
#define PAGE_SIZE ....
which, after some computation results into PAGE_SIZE 4096
According to POSIX PAGESIZE and PAGE_SIZE must be identical
* RTEMS's getpagesize.c contains a hard-coded 4096
* sysconf could easily return PAGE_SIZE, PAGESIZE, getpagesize() or else, but
doesn't so, ATM.
As a temporary band-aid, I am proposing to (ASAP)
+ change getpagesize() to return PAGE_SIZE
+ let sysconf( _SC_PAGESIZE|_SC_PAGE_SIZE) return PAGE_SIZE
Fixing PAGESIZE also should be put "on schedule", but doing so would require
some non-trivial surgery to newlib which needs to be tested carefully.
=> IMO, a post 4.7 release issue.
Related questions I can't answer "out-of-the-box"/without further
investigations:
- Does PAGESIZE|PAGE_SIZE have an impact on GCC?
- Does RTEMS apply page-sizes? (AFAICT: no)
--
Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
More information about the bugs
mailing list