realloc.. doesn't? (original) (raw)

# 01 January 2005

«

»

Apparently, Darwin's implementation of realloc never frees memory if you ask for a smaller size. Python, and probably plenty of other software, assumes that it does, because that's how it behaves on the other platforms (at least Linux and OpenBSD). Oops!