Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Creating a primitive array produce OutOfMemoryError #122

Open
@jmetertea

Description

When creating a primitive array with big size as:

CharArray(99912345)

It produces Exception:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Creates a new array of the specified size, with all elements initialized to null char (`\u0000').

Similar code in Java won't produce an exception:

char[]a = new char[99912345];

Same issue for other primitive arrays, as BooleanArray
BooleanArray(99912345)
Checked with Kotlin Playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /