Skip to content

setMaxSizeOf32bitArray(int index) for index > Integer.MAX_VALUE? #29

Description

@GSQuarch

Hi

I was asking recently about Transforms dealing with large arrays and running of memory, to which you replied that by default JLargeArrays use the regular 1D Java arrays up to 2^30 elements, and you can change that value using LargeArray.setMaxSizeOf32bitArray(). Let's say I want to use 2^34 or approx. 17bn. That exceeds the range of type int, which LargeArray.setMaxSizeOf32bitArray() uses and so throws a compilation error or a runtime error if a long is squeezed into an int.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions