Portable virtual memory management

Dmitry Olshansky dmitry.olsh at gmail.com
Thu Oct 31 11:07:05 PDT 2013


A small proposal to introduce such a facility into druntime.

See PR for preliminary API:
https://github.com/D-Programming-Language/druntime/pull/653

In focus is to provide a unified API that allows the most common 
scenarios to work efficiently:
  - allocating memory that has executable permissions
  - reserve and commit memory pages gradually
  - (un)locking of memory in physical RAM
  - getting the OS page size

And another one case I haven't yet found a way to implement/use portably:
  - guard pages

Platforms diverge significantly enough that there is not even a remote 
chance to have 100% efficient wrapper for all potential uses cases. But 
most of them should be possible with a bit of overhead.

Same reservations apply to any attempt to accommodate for each 
platform's special tricks (they are simply not portable).

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list