[PD] big files with textfile
Hans-Christoph Steiner
hans at eds.org
Sat Oct 27 23:41:58 CEST 2007
On Oct 27, 2007, at 2:44 PM, Mathieu Bouchard wrote:
> On Sat, 27 Oct 2007, marius schebella wrote:
>
>> textfile can handle bigger files than msgfile, but there seems to
>> be a limit, too. I tried to open a >250MB file, and Pd crashed.
>> marius.
>
> If you measure bytes using an int32, the limit is 2GB, but if you
> measure it in bits, the limit is 256MB. [textfile] does read all
> the file into a buffer as big as the file. I didn't find anything
> that counts memory in bits, so perhaps it's just a coïncidence and
> the bug was something else, but I did fix another 256MB limit bug
> recently by adding parentheses in something like:
>
> num_entries * bits_per_entry / 8
>
> When crossing the limit, the numbers become negative, and trying to
> allocate a negative amount causes the allocator to either abort the
> process or return NULL or corrupt memory...
If this is a bug in Pd, it would be great if you submitting a patch,
or at least posted more info here.
.hc
------------------------------------------------------------------------
----
kill your television
More information about the Pd-list
mailing list