[fpc-pascal] Array [THandle] of pointer

Andrew Brunner andrew.t.brunner at gmail.com
Wed Dec 24 01:54:05 CET 2008


Hehehehe....

I know.  I didn't realize that the map was that large. It's for
Indexing memory objects to threads.  I did something similar under
Delphi but now recall limiting the size from [-1..99999] or something
like that.  But that's in a 32 bit OS.  Doing it that way isn't going
to work.

I've got another way already.  I just didn't relate the size of the
actual structure.

On Tue, Dec 23, 2008 at 5:23 PM, Marc Weustink <marc at dommelstein.net> wrote:
>
> I'm surprised it crashes there. A THandle is IIRC a Cardinal on unix, so by
> defining a variable MyTest:TMyList, you allocate 4GB * SizeOf(TMyStruct) =
> 16GB on your stack. Usually a process doens't have that much space and I
> wonder if you wanted this.
>
> (You may want to look at the lcl Maps unit)
>
> Marc
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



More information about the fpc-pascal mailing list