Bug 11372 – getpagesize() should be in core.memory

Status
NEW
Severity
normal
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-28T13:46:05Z
Last change time
2024-12-07T13:32:59Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
Moved to GitHub: dmd#17124 →

Comments

Comment #0 by andrei — 2013-10-28T13:46:05Z
Should use the homonym call on Unix and an implementation as in http://www.genesys-e.org/jwalter/mix4win.htm on Windows.
Comment #1 by andrej.mitrovich — 2014-04-26T20:01:40Z
There is core.sys.posix.sys.shm.__getpagesize I guess you want a single wrapper for all platforms though?
Comment #2 by dmitry.olsh — 2014-04-26T20:12:50Z
> There is core.sys.posix.sys.shm.__getpagesize Actually on POSIX it's obtained via sysconf and _SC_PAGESIZE. Anyway I guess the point is that collector need to know page size anyway, and there is a global hidden somewhere deep that holds this size.
Comment #3 by schveiguy — 2018-05-04T10:41:45Z
(In reply to Dmitry Olshansky from comment #2) > Anyway I guess the point is that collector need to know page size anyway, > and there is a global hidden somewhere deep that holds this size. Was about to add an issue to suggest we expose this immutable. It's here: https://github.com/dlang/druntime/blob/86cd40a036a67d9b1bff6c14e91cba1e5557b119/src/core/thread.d#L3619 Can I make a pull to provide access to this somewhere public? Alternatively, we could just make the immutable public.
Comment #4 by robert.schadek — 2024-12-07T13:32:59Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17124 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB