Make initializers page-aligned?

On Fri, 24 Aug 2012 14:41:16 +0200, Bernd Oppolzer wrote:
>
>Using the compiler option ROCONST (which is NOT the default with C
>programs),

... to avoid treading, however lightly, on the ANSI standard.

>you can specify that variables with the const attribute not be moved to
>the WSA - that
>is, the const attribute is respected. Otherwise (NOROCONST) it is ignored.
>This is the default with C (not with C++).
> 
I suspect const is not entirely ignored.  Won't the compiler warn you
if you modify, or even threaten to modify, a const object?  But is it
moved to WSA even if it's declared static const?  There would seem
to be no reason for that.

>Another way is using #pragma variable (variable_name, norent) for every
>such large
>read-only table, which has the same effect.
>
>Any further suggestions?
> 
No, but it occurs to me that a #pragma to page-align the initial
values so the storage could be reclaimed once initialization is
complete might be valuable.  This might even be reasonable
default behavior.  Even better if numerous small initializers
could be gather-loaded into a disposable page.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to