[
https://issues.apache.org/jira/browse/DERBY-3731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615971#action_12615971
]
Knut Anders Hatlen commented on DERBY-3731:
-------------------------------------------
I think the patch looks good. We can always add more os.arch values later as we
discover new ones. Since os.arch is defined by the spec, I think it is a good
thing to check it if sun.arch.data.model is not found or not accessible. Later,
if this change doesn't cause any problems, should we also mention these
properties in the documentation and put them in the default policy installed by
the network server?
One small suggestion to make the code slightly simpler: The two loops in the
checking of os.arch could be replaced by
if (Arrays.asList(b32).contains(arch)) return 4;
and
if (Arrays.asList(b64).contains(arch)) return 8;
And maybe the code to get the value of a system property could be moved into a
separate method to save some code duplication.
Should the THROWASSERT() be replaced with a DEBUG_PRINT() so that we don't
prevent people from running the debug builds on platforms not used by the
developers?
> Improve calculation of refSize in ClassSize.java
> -------------------------------------------------
>
> Key: DERBY-3731
> URL: https://issues.apache.org/jira/browse/DERBY-3731
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Reporter: Kathey Marsden
> Priority: Minor
> Attachments: derby-3731-1a-refsize_from_properties.diff,
> DERBY-3731_diff.txt
>
>
> java/engine/org/apache/derby/iapi/services/cache/ClassSize.java has a static
> code block which calculates the size of a reference for the architecture.
> This code could be improved by adding garbage collection before measuring
> memory, to give a consistent reading. Also there have been suggestions
> that we use os.arch or sun.arch.data.model to make the measurement more
> reliable, especially on 64bit machines.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.