http://d.puremagic.com/issues/show_bug.cgi?id=6014



--- Comment #11 from changlon <[email protected]> 2011-07-17 19:39:01 PDT ---
I do not understand the mechanism of druntime , this problem has troubled me
for a long time .

According to my simple understanding, the following code does not cover up the
failure, But in fact it failed. Is I got it wrong or druntime has a bug?

------------------------------------------------------
import core.memory;
void main(){
        auto attr = cast(GC.BlkAttr) 0b1 ;
        auto test = GC.malloc(10, attr);
        GC.setAttr(test, 0);
        auto _attr = GC.getAttr(test);
        assert(attr != _attr);
}
-----------------------------------------------------

I use GC.malloc and  GC.realloc to speed up the memory alloc,  A memory block
attr has be changed before exit main function .

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to