Why does unique_ptr instantiation compile to larger binary than raw pointer? : <p>I was always under the impression that a <code>std::unique_ptr</code> had no overhead compared to using a raw pointer. However, compiling the following code</p>

<pre><code>#include &lt;memory&gt;

void raw_pointer() {
  int* p = new int[100];
  delete[] p;
}

void smart_pointer() {
  auto p = std::make_unique&lt;int[]&gt;(100);
}
</code></pre>

<p>with <code>g++ -std=c++14 -O3</code> produces the following assembly:</p>

<pre><code>raw_pointer():
        sub     rsp, 8
        mov     edi, 400
        call    operator new[](unsigned long)
        add     rsp, 8
        mov     rdi, rax
        jmp     operator delete[](void*)
smart_pointer():
        sub     rsp, 8
        mov     edi, 400
        call    operator new[](unsigned long)
        lea     rdi, [rax+8]
        mov     rcx, rax
        mov     QWORD PTR [rax], 0
        mov     QWORD PTR [rax+392], 0
        mov     rdx, rax
        xor     eax, eax
        and     rdi, -8
        sub     rcx, rdi
        add     ecx, 400
        shr     ecx, 3
        rep stosq
        mov     rdi, rdx
        add     rsp, 8
        jmp     operator delete[](void*)
</code></pre>

<p>Why is the output for <code>smart_pointer()</code> almost three times as large as <code>raw_pointer()</code>?</p>
