RFR(XS): 8050228: Rename 'rem_size' in compactibleFreeListSpace.cpp because of name clashes on AIX" -f 8050228_rename_rem_size.patch
David Holmes
david.holmes at oracle.com
Wed Jul 16 02:14:19 UTC 2014
On 16/07/2014 2:54 AM, Volker Simonis wrote:
> Hi,
>
> could somebody please review and sponsor this little change:
GC code should be taken by GC folk. (aka buck passing :) )
FWIW change looks fine to me. The name remain_size grates a little but
spelling out remaining_size grates even more. I don't have a better
suggestion but perhaps GC folk will.
Cheers,
David
> http://cr.openjdk.java.net/~simonis/webrevs/8050228/
> https://bugs.openjdk.java.net/browse/JDK-8050228
>
> Background:
>
> I know this sounds crazy but it's true: there's an AIX header which
> unconditionally defines rem_size:
>
> /usr/include/sys/xmem.h
> struct xmem {
> ...
> #define rem_size u2._subspace_id2
> };
>
> This breaks the compilation of
> CompactibleFreeListSpace::splitChunkAndReturnRemainder() which uses a
> local variable of the same name.
>
> Until now, we've worked around this problem by simply undefining
> 'rem_size' in the platform specific file os_aix.inline.hpp but after
> "8042195: Introduce umbrella header orderAccess.inline.hpp" this
> doesn't seems to be enough any more.
>
> So before introducing yet another ugly platform dependent hack in
> shared code or depending on a certain include order of otherwise
> unrelated platform headers in shared code I suggest so simply give up
> and rename the local variable.
>
> In this change I've renamed 'rem_size' to 'remain_size' because "rem"
> is used as abbreviation of "remainder" in the code. But actually I'd
> be happy with any other name which differs from "rem_size".
>
> Thank you and best regards,
> Volker
>
More information about the hotspot-dev
mailing list