Last updated at 12:09 am UTC on 15 August 2011
Normal Smalltalk Array's are a primitive collection object that is preallocated all at once, and cannot be resized. However, it provides very fast read and write access to the slots; which reference any type of Object.
A MagmaArray is similar to a normal Array with the following differences:
- It can contain more than a billion pointers to other objects.
- #at: access only retrieves a page of objects into memory at a time.
- Concurrency among multiple sessions is allowed at different indices. However, commit-conflicts are detected when two sessions try to update the same index with different objects.
- MagmaArray's are not pre-allocated, they grow dynamically, however, like a real Array, they never shrink.
To create a new MagmaArray:
MagmaArrays are used in some of Magma's other special collections.