Encountered in a Requests issue. Also tracking it on a PyOpenSSL issue.
ffi.new("char", 1024 * 1024 * 1024) will allocate a 1GB byte buffer and will then zero it. This is because CFFI uses calloc to do its allocations.
In general, this is a useful property. However, for some cases it's not helpful, and would be actively better if we could avoid it. In particular, for cases where we want to receive data into a byte buffer, we don't care if it gets zeroed: that is basically a wasted extra copy. It would be great if applications that want it can opt-into an allocation of a truly empty byte buffer without resorting to binding