String corrupts the heap and crashes

I looked through the source code a bit and I think the answer is to modify the changeBuffer method to allocate more than what's needed at that point in time. A common desire for new programmers is to read a stream and keep adding one extra character to a String. If the changeBuffer method added something like 10 or 20 extra bytes each time, there would be much less fragmentation.

On the other hand, it uses realloc() -- how much of this padding does realloc() do?