RFR: 8014513: Sjavac doesn't detect 32-bit jvm properly
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Jun 5 11:40:55 PDT 2013
On 06/05/2013 11:38 AM, Jonathan Gibbons wrote:
> On 06/05/2013 07:24 AM, Erik Joelsson wrote:
>> Hello,
>>
>> Here is a small patch fixing a problem with sjavac. Sjavac tries to
>> be smart about sizing itself to no run out of memory. The logic for
>> figuring out if it's running on a 32 or 64bit jvm is rather crude and
>> misses on several platforms. This patch makes the code more robust.
>>
>> Fixing this issue is a requirement to get sjavac to work well on all
>> platforms in jprt.
>>
>> Bug: http://bugs.sun.com/view_bug.do?bug_id=8014513
>>
>> Webrev: http://cr.openjdk.java.net/~erikj/8014513/webrev.langtools.01/
>>
>> /Erik
>
> Erik,
>
> It's OK, but I think it would be better if there was a back door to
> override the default value. That would also partially address the
> comment in the bug about sjavac looking at the wrong JVM -- it's using
> the client process, not the server process.
>
> If you push it as is, I suggest you file a followup bug for further
> improvements.
>
> -- Jon
Erik,
The code might also look better if you used a Set<String> for 32 bit
values, and tested for set.contains(dataModel), or if not that, the use
a strings-in-switch statement.
-- Jon
More information about the compiler-dev
mailing list