Re: GCAllocator goodAllocSize?

2016-02-01 Thread Jakob Ovrum via Digitalmars-d
On Sunday, 31 January 2016 at 18:52:48 UTC, Steven Schveighoffer wrote: 2. How does one allocate with an allocator for typed info? In other words, the GC will call the dtor, but only if it knows what type you put in there. With std.experimental.allocator, there isn't a way to do that.

Re: GCAllocator goodAllocSize?

2016-02-01 Thread Jakob Ovrum via Digitalmars-d
On Tuesday, 2 February 2016 at 05:04:00 UTC, Jakob Ovrum wrote: On Sunday, 31 January 2016 at 18:52:48 UTC, Steven Schveighoffer wrote: 2. How does one allocate with an allocator for typed info? In other words, the GC will call the dtor, but only if it knows what type you put in there. With

Re: GCAllocator goodAllocSize?

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d
On 1/31/16 1:52 PM, Steven Schveighoffer wrote: OK, I'm making a PR for this. https://github.com/D-Programming-Language/phobos/pull/3962 -Steve

Re: GCAllocator goodAllocSize?

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d
On 1/30/16 12:41 PM, Andrei Alexandrescu wrote: On 1/29/16 9:52 PM, Steven Schveighoffer wrote: import std.experimental.allocator.gc_allocator; void main() { //GCAllocator.instance.goodAllocSize(3000); // error writeln(theAllocator.goodAllocSize(3000)); // 3008, should be 4096 } This

Re: GCAllocator goodAllocSize?

2016-01-30 Thread Andrei Alexandrescu via Digitalmars-d
On 1/29/16 9:52 PM, Steven Schveighoffer wrote: import std.experimental.allocator.gc_allocator; void main() { //GCAllocator.instance.goodAllocSize(3000); // error writeln(theAllocator.goodAllocSize(3000)); // 3008, should be 4096 } This is known info, why is it not available? Is there

GCAllocator goodAllocSize?

2016-01-29 Thread Steven Schveighoffer via Digitalmars-d
import std.experimental.allocator.gc_allocator; void main() { //GCAllocator.instance.goodAllocSize(3000); // error writeln(theAllocator.goodAllocSize(3000)); // 3008, should be 4096 } This is known info, why is it not available? Is there a reason this needs to be inaccurate? I can create