Arrays vs Lists (speedtest)

BlitzMax Forums/BlitzMax Programming/Arrays vs Lists (speedtest)

I thought somewhere that when they added the locking feature to banks, as a requirement before you can access them, we were told it was necessary due to the potential for memory to be moved around by the o/s or something and that you had to lock it to keep it in place? ... But then, BRL's modules themselves use a lot of mem alloc that doesn't use banks so I don't quite see how that's consistent. Allocating memory gives you a pointer to the base of it, which you pass in order to free the memory, so I am presuming that pointer must NOT change otherwise not only would you write to random memory and cause a crash, but you'd not be able to free the memory? Unless Blitz keeps track of its reallocated pointer internally? I don't know. I think I will still aim to use memory rather than banks if not just because you don't need the extra fields/data to store the bank object and the bank base pointer separately. Or.. if there is good reason to use the bank, for safety reasons, maybe I'll consider it.

Speaking of pointer access, I guess it's okay to do myarray[15,20] to access a multidimensional array but you're not allowed to do mypointer[15,20] as a way of accessing memory (because it doesn't know how wide your rows are?)