code review (round 2) for memory commit failure fix (8013057)

Daniel D. Daugherty daniel.daugherty at oracle.com
Wed Jun 5 08:51:36 PDT 2013


On 6/5/13 7:01 AM, Daniel D. Daugherty wrote:
> On 6/5/13 2:02 AM, Stefan Karlsson wrote:
>> http://cr.openjdk.java.net/~dcubed/8013057-webrev/2-hsx25/src/share/vm/runtime/os.hpp.udiff.html 
>>
>>
>> +// Executable parameter flag for os::commit_memory() and
>> +// os::commit_memory_or_exit().
>> +enum ExecMemFlag {
>> +  ExecMem = true
>> +};
>>
>>
>> Why is this an Enum and not a const bool when it's used as a bool?
>
> Hmmm... It's an Enum because that seemed to be style used in other places
> in the VM when we didn't want to pass "true /* some comment */" as a
> parameter. Do you happen to have a "const bool" example I could look at?
> I'll poke around, but if you could point me at an example, I would
> appreciate it...

I found some examples in .hpp files both inside and outside class
definitions so I'm good to go.

Dan



More information about the hotspot-runtime-dev mailing list