[fpc-pascal] Setlength
Jonas Maebe
jonas.maebe at elis.ugent.be
Fri Dec 4 17:08:22 CET 2009
On 04 Dec 2009, at 17:03, Flávio Etrusco wrote:
> On Fri, Dec 4, 2009 at 12:32 PM, Jonas Maebe <jonas.maebe at elis.ugent.be
> > 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
>> or
>> 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.
Jonas
More information about the fpc-pascal
mailing list