[Issue 16564] KRRegion.empty sometimes returns Ternary.no
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jul 13 08:17:57 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=16564
--- Comment #7 from Temtaime <temtaime at gmail.com> ---
Oh, sorry, my mistake
import
std.stdio,
std.range,
std.random,
std.typecons,
std.algorithm,
std.experimental.allocator.building_blocks,
core.memory;
void main()
{
ubyte[128 * 1024] b;
auto alloc = KRRegion!()(b);
//alloc.switchToFreeList;
auto k = alloc.allocate(128);
assert(alloc.deallocate(k));
assert(alloc.empty == Ternary.yes);
}
I don't know why but this simplest example asserts.
More complex tests are passed. Also it passes if the switch in uncommented
--
More information about the Digitalmars-d-bugs
mailing list