Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOAObject measureByteSize() could return negative value if the size is > 2^31-1 #271

Open
nuwangunasekara opened this issue Mar 7, 2023 · 1 comment

Comments

@nuwangunasekara
Copy link
Collaborator

MOAObject measureByteSize() could return negative value if the size is > 2^31-1:

`

public interface MOAObject extends Serializable {

/**
 * Gets the memory size of this object.
 *
 * @return the memory size of this object
 */
public int measureByteSize();

/**
 * This method produces a copy of this object.
 *
 * @return a copy of this object
 */
public MOAObject copy();

/**
 * Returns a string representation of this object.
 * Used in <code>AbstractMOAObject.toString</code>
 * to give a string representation of the object.
 *
 * @param sb	the stringbuilder to add the description
 * @param indent	the number of characters to indent
 */
public void getDescription(StringBuilder sb, int indent);

}
`

@nuwangunasekara
Copy link
Collaborator Author

Patch with relevant changes to support models with size greater than 2^31-1:
moa_measureByteSize.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant