title: Python Ctypes - Issues with calloc
body: <p>I'm not entirerly sure how to use <code>calloc</code> in Python with ctypes.</p>
  <p>I have the following code:</p>
  <pre class="lang-py prettyprint-override"><code>import ctypes
  
  dll = ctypes.CDLL('libc.so.6')
  
  # void* calloc (size_t num, size_t size);
  dll.calloc.argtypes = (ctypes.c_size_t, ctypes.c_size_t)
  dll.calloc.restype = ctypes.c_void_p
  
  address: int = dll.calloc(4, 28) # how do write to this memory?
  
  # can i do something like this?
  
  for i in range(4):
     address += 1
     do_something_with_memory(address, i)
  </code></pre>
  <p>I'm not even sure that it's creating the memory correctly, since the code below results in a segmentation fault:</p>
  <pre class="lang-py prettyprint-override"><code>ctypes.cast(address, ctypes.py_object).value # segmentation fault
  </code></pre>