Dave Mitchell wrote: > I'd be interested in what people get with that code on other OSes. 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.) I wrote some similar code a couple of years ago using malloc_size, and found that 32-bit darwin allocates in 16-octet chunks. Running your code now, it appears that 64-bit darwin does the same: $ ./a.out after 16 bytes realloc() using different address after 32 bytes realloc() using different address after 48 bytes realloc() using different address after 64 bytes realloc() using different address after 80 bytes realloc() using different address after 96 bytes realloc() using different address after 112 bytes realloc() using different address after 128 bytes realloc() using different addressThread Previous | Thread Next