kutsurak / python-bitstring

Automatically exported from code.google.com/p/python-bitstring
0 stars 0 forks source link

Double memory needed on creation #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you create an 1GB zeroed bitstring:

   s = ConstBitArray(8000000000)

then it will need to allocate 2GB of memory, if only briefly. I think this is 
because it makes a bytearray then creates a bytes from that, so briefly both 
exist.

This halves the effective size of bitstrings that can be created given an upper 
memory limit.

Original issue reported on code.google.com by dr.scott...@gmail.com on 19 Apr 2011 at 5:31

GoogleCodeExporter commented 9 years ago
Fixed in r.899.

Original comment by dr.scott...@gmail.com on 30 May 2011 at 1:18