bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: intptr_t vs. uintptr_t


From: Paul Eggert
Subject: Re: intptr_t vs. uintptr_t
Date: Sat, 14 Dec 2019 14:29:31 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/14/19 1:14 AM, Bruno Haible wrote:
> Suppose that we have an array that extends from 0x7fff8000 to 0x80003fff

Ah, I hadn't thought about that. Thanks for mentioning it.

With Emacs's use of intptr_t this should not be an issue, since Emacs either
does no arithmetic on intptr_t values, or does only minor arithmetic (typically
pointer tagging) that keeps the address on the same page. However, you're right
that uintptr_t is preferable in cases that might cross page boundaries, and I
installed the attached into the Emacs Lisp reference manual to try to capture
that advice.

Attachment: 0001-Adjust-intptr_t-advice.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]