> On Fri, Dec 4, 2009 at 12:32 PM, Jonas Maebe <[hidden email] > > wrote:
>> On 04 Dec 2009, at 14:57, Carsten Bager wrote:
>>> I have 2 lines of code
>>> 1 I allocate memory
>>> 2 I read from the screen (Nano-X) and save it in the "BitMapArray".
>>> Can I do this or can I not be sure that the memory is in one block.
>> I have no idea whether that is guaranteed. It is currently
>> implemented in
>> that way, but I don't know whether that is an implementation detail
>> guaranteed behaviour.
> By "in one block" does he mean "contiguous user-space addresses"?
> If so, I don't understand your answer. How would a non-contiguous
> allocation work?
There are many implementations of dynamic array-like structures that
externally behave like an array, but which internally divide the array
over multiple allocations. The reason is that contiguous virtual
memory space is not infinite either, especially not in 32
applications. Indexing is then internally performed using 2 (first
select the subarray, then the element) or more steps.