Re: Allocating aligned memory blocks?

2014-12-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/12/14 2:02 AM, safety0ff wrote: On Friday, 12 December 2014 at 06:17:56 UTC, H. S. Teoh via Digitalmars-d-learn wrote: Is there a way to allocate GC memory blocks in D that are guaranteed to fall on OS page boundaries? I don't know about guarantees, I think that in practice, if your OS

Allocating aligned memory blocks?

2014-12-11 Thread H. S. Teoh via Digitalmars-d-learn
Hi all, I'm working on a very large associative array implementation that stores most of the data on disk, and I need to allocate a number of cache areas for keeping hot disk pages in RAM. Is there a way to allocate GC memory blocks in D that are guaranteed to fall on OS page boundaries? Or

Re: Allocating aligned memory blocks?

2014-12-11 Thread safety0ff via Digitalmars-d-learn
On Friday, 12 December 2014 at 06:17:56 UTC, H. S. Teoh via Digitalmars-d-learn wrote: Is there a way to allocate GC memory blocks in D that are guaranteed to fall on OS page boundaries? I don't know about guarantees, I think that in practice, if your OS page size is 4096, any GC allocation