[Python-Dev] Darwin's realloc(...) implementation never shrinks allocations

2005-01-02 Thread Bob Ippolito
Quite a few notable places in the Python sources expect realloc(...) to relinquish some memory if the requested size is smaller than the currently allocated size. This is definitely not true on Darwin, and possibly other platforms. I have tested this on OpenBSD and Linux, and the

Re: [Python-Dev] Darwin's realloc(...) implementation never shrinks allocations

2005-01-02 Thread Tim Peters
[Bob Ippolito] ... Your expectation is not correct for Darwin's memory allocation scheme. It seems that Darwin creates allocations of immutable size. The only way ANY part of an allocation will ever be used by ANYTHING else is if free() is called with that allocation. Ya, I understood that.

Re: [Python-Dev] Zipfile needs?

2005-01-02 Thread Guido van Rossum
Encryption/decryption support. Will most likely require a C extension since the algorithm relies on ints (or longs, don't remember) wrapping around when the value becomes too large. You may want to do this in C for speed, but C-style int wrapping is easily done by doing something like x = x