title: How to work around Python 3 maximum string size?
body: <p>On a 64 bit Python build with a <code>sys.maxsize</code> of 9223372036854775807 the
  interpreter nevertheless throws a <em>MemoryError</em> if I allocate a string of more
  than <em>INT_MAX - 512 MiB</em> chars:</p>
  
  <pre><code>$ python3
  #Python 3.6.6 (default, Jul 19 2018, 14:25:17) 
  [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; s = "*" * 2684354560
  &gt;&gt;&gt; s = "*" * 2684354561
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  MemoryError
  </code></pre>
  
  <p>(The limit is the same for <em>bytes</em> whose element type is definitely 8 bits.)
  There is plenty of free memory and swap so I am certain the system is not
  hitting any physical limits.</p>
  
  <p>What is happening here and how can I increase this cap?</p>