On Tue, Sep 23, 2014 at 12:49:19PM -0000, Father Chrysostomos wrote: > Dave Mitchell wrote: > That code does not account for the possibility that the allocated area > may be extended, rather than moved. (I don't know whether malloc > does that.) that's what the throwaway malloc() is there for: without that, on my system, the realloc()ed area just keeps growing. With the extra malloc, its forced to re-allocate. -- My get-up-and-go just got up and went.Thread Previous