title: What does Znwm and ZdlPv mean in assembly?
body: <p>I'm new to assembly and I'm trying to figure out how C++ handles dynamic dispatch in assembly. </p>
  
  <p>When looking through assembly code, I saw that there were 2 unusual calls:</p>
  
  <pre><code>call _Znwm
  call _ZdlPv
  </code></pre>
  
  <p>These did not have a subroutine that I could trace them to. From examining the code, Znwm seemed to return the address of the object when its constructor was called, but I'm not sure about that. ZdlPv was in a block of code that could never be reached (it was jumped over). 
  C++:</p>
  
  <pre><code>Fruit * f;
  f = new Apple();
  </code></pre>
  
  <p>x86:</p>
  
  <pre><code># BB#1:
      mov eax, 8
      mov edi, eax
      call    _Znwm
      mov rdi, rax
      mov rcx, rax
  .Ltmp6:
      mov qword ptr [rbp - 48], rdi # 8-byte Spill
      mov rdi, rax
      mov qword ptr [rbp - 56], rcx # 8-byte Spill
      call    _ZN5AppleC2Ev
  </code></pre>
  
  <p>Any advice would be appreciated.
  Thanks.</p>