FYI - mo' work on std.allocator
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 5 22:01:49 PDT 2014
Am Mon, 05 May 2014 11:23:58 -0700
schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:
> On 5/5/14, 9:57 AM, Marco Leise wrote:
> > That sounds like a more complicated topic than anything I had
> > in mind. I think a »std.virtualmemory« module should already
> > implement all the primitives in a portable form, so we don't
> > have to do that again for the next use case. Since
> > cross-platform code is always hard to get right, it could also
> > avoid latent bugs.
> > That module would also offer functionality to get the page
> > size and allocation granularity and wrappers for common needs
> > like getting n KiB of writable memory. Management however
> > (i.e. RAII structs) would not be part of it.
> > It sounds like not too much work with great benefit for a
> > systems programming language.
>
> I think adding portable primitives to
> http://dlang.org/phobos/std_mmfile.html (plus better yet refactoring its
> existing code to use them) would be awesome and wouldn't need a DIP. --
> Andrei
I like Dmitry's core.vm better, since conceptually we are not
necessarily dealing with memory mapped files, but probably
with just-in-time compilation, circular buffers, memory
access tracing etc. Virtual memory really is a basic building
block.
--
Marco
More information about the Digitalmars-d
mailing list