Region allocator strage error
mark_mcs via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Feb 1 13:52:01 PST 2016
On Monday, 1 February 2016 at 19:55:26 UTC, mark_mcs wrote:
> On Monday, 1 February 2016 at 12:05:53 UTC, ref2401 wrote:
>> On Sunday, 31 January 2016 at 14:48:34 UTC, ref2401 wrote:
>>> I am getting runtime error:
>>> core.exception.AssertError at std\experimental\allocator\building_blocks\region.d(235): Assertion failure
>>
>> At least tell me can anyone replicate it?
>
> Reproduced on Windows 7 Pro x64 and Windows 10 Pro x64, DMD
> 2.070 and 2.069.2. I don't have any 32-bit machines to test.
> I'll try and debug later.
This should fail on 64-bit Linux builds.
import std.experimental.allocator;
import std.experimental.allocator.building_blocks;
void main(string[] args) {
ubyte[1024] memory;
auto alloc = Region!NullAllocator(memory);
auto result = alloc.allocate(20);
alloc.expand(result, 20);
}
More information about the Digitalmars-d-learn
mailing list