In C, if it is a struct, each member will be next to (after any necessary padding), the next member. Same for arrays.
Anything else is not guaranteed. iirc You can test what memory addresses are being allocated, of course, and I'm sure you'll find adjacent order, AT FIRST, before any memory fragmentation has been done. Why not print out five or six addresses that are allocated right at the start of a program, and then repeat that after your program has used some memory elsewhere, and only released some of it. You could make a display on-screen as the different addresses are allocated, even. Perhaps someone on Sourceforge.net has already done this? Adak --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---