Understanding memory

BlitzMax Forums/BlitzMax Beginners Area/Understanding memory

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

In, C, if I were to create an array of a certain type :

dContact contact[10];

..would this be allocated in a contiguous block, since in C you can seemingly reference each entry with a simple offset based on the size of dContact.

When creating an equivalent structure in Max...

contact:dContact[] = new dContact[10]

you then subsequently have to instantiate the objects using :

contact[0] = new dContact

Are these objects going to be created in a block order, or placed randomly in memory?


The reason I ask is that I need to pass the array into a C-code routine, and I'm not convinced the C will step through the Max array in the same way as a C one...
??