Re: 3GB address space



I experimented a bit with integer arithmetic, intentionally causing an
overflow, but the results seemed ok and there were no overflow error
messages of any kind. If all you do is addition/substruction, when there
shouldn't be any difference between integers and cardinals, according to
what I understand. The sign is only a matter of interpretetion. Internally
they are the same.
Am I wrong in some manner? What can still cause problems?

"Nicholas Sherlock" <N.sherlock@xxxxxxxxx> wrote in message
news:44f361e7@xxxxxxxxxxxxxxxxxxxxxxxxx
Leo wrote:
I read several times that some programs are unsafe for >2GB address
space. What should you guard against to make sure that your program is
compatibale with large address space?

I'm not sure how programs get into trouble with this. They probably cast
pointers as Integers, then perform pointer arithmetic on them. Only cast
pointers to an unsigned 32-bit type for pointer arithmetic and the problem
should go away.

Cheers,
Nicholas Sherlock

--
http://www.sherlocksoftware.org


.


Loading