RFR: JDK-8157141 & JDK-8166454: Solaris getisax(2) and meminfo(2) cleanup

Alan Burlison Alan.Burlison at oracle.com
Tue Oct 4 18:37:11 UTC 2016


On 04/10/16 17:18, Kim Barrett wrote:

>> You are right, it expects the number of elements rather than the more usual convention of passing buffer length in bytes. Sigh.
>
> Yikes!  Sorry I missed that.

Dunno what you are apologizing for, it was my bug ;-)

>> I've replaced it with:
>>
>> uint_t avn = getisax(avs, sizeof(avs) / sizeof(avs[0]));
>>
>> as that will auto-adapt if the declaration of avs is ever changed.
>
> We have a macro for that - ARRAY_SIZE(avs)
>
> It’s in globalDefinitions.hpp, on the off chance that’s somehow not already being included.

Cool, I'll pop that in instead - thanks!

-- 
Alan Burlison
--


More information about the hotspot-runtime-dev mailing list