Dear Robert, On Aug 7, 5:17 pm, Robert Bradshaw <rober...@math.washington.edu> wrote: ... > > It realloc error prone? > > Doubtful, or we'd be crashing all over. I thought it was guaranteed > to give you back the same spot if you realloc to something smaller, > but that may not be the case, and certainly isn't if it's something > bigger.
A google search pointed me to some discussions where it was pointed out that even when the size is reduced then the reallocation might fail, in which case NULL is returned and the allocated memory is not freed. > Have you tried not doing the realloc? Maybe something else is hanging > onto it and still thinks it's full size. Yes, this eventually turned out to be the case. Some parameter was still set to the original memory size, and wasn't reset. By consequence, I tried to read from non-allocated memory. Cheers, Simon --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---