https://issues.dlang.org/show_bug.cgi?id=15481

ag0ae...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0ae...@gmail.com
            Summary|Reducing array.length       |GC profiler thinks reducing
                   |triggers reallocation       |array.length triggers
                   |                            |reallocation

--- Comment #1 from ag0ae...@gmail.com ---
This is a bug in the GC profiler. The array is not relocated. You can check by
comparing the pointers:

----
void main()
{
    int[] arr;
    arr.length = 7;
    int* p = arr.ptr;
    arr.length = 6;
    assert(arr.ptr == p); /* passes */
}
----

I'm changing the title of this issue accordingly.

--

Reply via email to