RFR(XS): 8050228: Rename 'rem_size' in compactibleFreeListSpace.cpp because of name clashes on AIX" -f 8050228_rename_rem_size.patch
Volker Simonis
volker.simonis at gmail.com
Tue Jul 15 16:54:11 UTC 2014
Hi,
could somebody please review and sponsor this little change:
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