On Tuesday, 27 May 2014 at 18:19:14 UTC, Andrei Alexandrescu wrote:
On 5/27/14, 7:59 AM, MachMit wrote:
On Tuesday, 27 May 2014 at 13:06:10 UTC, Ola Fosheim Grøstad wrote:
...However, I cannot really come up with a single situation where I
don't know what kind of allocator I have used when accessing a
pointer....

Heap allocation in D is up to the user. Can you imagine something like http://sourceforge.net/projects/fastmm/ in D ? It's a (sorry for being an arsh) fuckin good memory manager...It's for user or RT allocations, it detects leaks, etc...It should be a source of inspiration for the
top-notch D guys...

Is there a white paper available for FastMM? Couldn't find any. -- Andrei

The source file is documented IIRC. It could be a source of inspiration for the allocators (There is something about that in D you've introduced a few monthes ago, I think...), or maybe a branch/sub-set, GC-free, version of D arrays and classes.

But it was mainly written for the previous-decade delphi.(D7 to D2009), the point is it contains some optimized version of memcpy and memmove (inline asm partially comming from the fastcode project(http://fastcode.sourceforge.net/ for the x86 arch. at least...) But At this time the memory model was the same as D except that you (the programmer) were the GC...Otherwise the compilo was inserting some automatic cleanup code for locally allocated data(even when standing in the heap...)...

However something like this would be better than some user call to malloc/realloc...(because it internally handles the hardware spec...i.e
when copying: the page size, vector operations).

Reply via email to