Date: Thu, 31 Jul 2025 13:28:34 -0400
I'm working on tooling for the SNES. The first 8192 bytes of bank zero are
mapped to the first , The stack is easiest to place growing to the top of
this region, then the direct page at the end. Only address 0 is treated as
invalid, even address 1 can be allocated (for alignment 1). If I'm told I
can't allocate the first 512 bytes of the address space, then I'm losing
511 bytes that could be used for the stack.
On Thu, 31 Jul 2025 at 10:54, zxuiji via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> So we're designing for lala land where any and all silly systems exist are
> we? Just define a minimum based on real world standards which as far as I'm
> aware is 512 minimum which is reasonable enough for a `MIN_PAGE_SIZE 512`
> macro and certainly reasonable for a `MAX_INVALID_ADDRESS ((void*)512)`
> macro
>
> On Thu, 31 Jul 2025 at 15:49, Thiago Macieira <thiago_at_[hidden]> wrote:
>
>> On Thursday, 31 July 2025 07:35:31 Pacific Daylight Time zxuiji wrote:
>> > Then the answer to the potential null+-1 being valid is simple, mandate
>> in
>> > the next standard that the 0+-PAGE_SIZE be premapped as sealed no rwx
>> > pages. That resolves the problem completely. They don't need to have
>> > anything mapped to them, just that they be mapped as invalid.
>>
>> There's no PAGE_SIZE in the standard. Nor in POSIX, for that matter.
>> POSIX
>> only has a runtime requirement for sysconf(_SC_PAGESIZE), with no
>> required
>> minimum.
>>
>> Without a minimum, there could hypothetically be a system with a page
>> size of
>> 1, which means the change you're proposing is useless.
>>
>> --
>> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>> Principal Engineer - Intel Platform & System Engineering
>>
>>
>>
>> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
mapped to the first , The stack is easiest to place growing to the top of
this region, then the direct page at the end. Only address 0 is treated as
invalid, even address 1 can be allocated (for alignment 1). If I'm told I
can't allocate the first 512 bytes of the address space, then I'm losing
511 bytes that could be used for the stack.
On Thu, 31 Jul 2025 at 10:54, zxuiji via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> So we're designing for lala land where any and all silly systems exist are
> we? Just define a minimum based on real world standards which as far as I'm
> aware is 512 minimum which is reasonable enough for a `MIN_PAGE_SIZE 512`
> macro and certainly reasonable for a `MAX_INVALID_ADDRESS ((void*)512)`
> macro
>
> On Thu, 31 Jul 2025 at 15:49, Thiago Macieira <thiago_at_[hidden]> wrote:
>
>> On Thursday, 31 July 2025 07:35:31 Pacific Daylight Time zxuiji wrote:
>> > Then the answer to the potential null+-1 being valid is simple, mandate
>> in
>> > the next standard that the 0+-PAGE_SIZE be premapped as sealed no rwx
>> > pages. That resolves the problem completely. They don't need to have
>> > anything mapped to them, just that they be mapped as invalid.
>>
>> There's no PAGE_SIZE in the standard. Nor in POSIX, for that matter.
>> POSIX
>> only has a runtime requirement for sysconf(_SC_PAGESIZE), with no
>> required
>> minimum.
>>
>> Without a minimum, there could hypothetically be a system with a page
>> size of
>> 1, which means the change you're proposing is useless.
>>
>> --
>> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>> Principal Engineer - Intel Platform & System Engineering
>>
>>
>>
>> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2025-07-31 17:28:50