title: fork seems to copy when unnecessary
body: <p>I'm trying the CoW of <code>fork</code> (<sub>see edit for more detailed background, which may be quite unrelated</sub>)</p>
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  #include &lt;time.h&gt;
  #include &lt;unistd.h&gt;
  
  #define N 262144
  struct {
      int n;
      int padding[1023];
  } arr[N];
  int main() {
      int i, sp = 0, t, tx = clock();
      for (i=0; i&lt;N; ++i) arr[i].n = i;
      printf (&quot;Init Time: %d\n&quot;, clock()-tx);
      #if 1
          sp = fork();
          if(!sp) _exit(0);
          waitpid(sp, &amp;sp, 0);
      #endif
      // 5045 without fork
      // 104192 with fork
      t = clock();
      for (i=0; i&lt;N; ++i) arr[i].n = -i;
      printf (&quot;Runner %d Time: %d\n&quot;, sp, clock() - t);
      getchar();
      return 0;
  }
  </code></pre>
  <p>The <code>fork</code> makes later memory accesses slower.</p>
  <p>Do <code>fork</code> copy making it slow? If so, why? I run on Ubuntu 20.04.3 LTS</p>