Skip to content

Improve deallocation of direct ByteBuffers using sun.misc.Unsafe? #10

@cowtowncoder

Description

@cowtowncoder

Apparently deallocation of direct-allocated ByteBuffers is bit tricky, since underlying off-heap buffers are NOT necessarily freed in timely manner, partly since there is no mechanism to force deallocation. As such they might only be collected when GC kicks in.

However there is apparently a way to force freeing using sun.misc.Unsafe. If so, we should probably try to use that mechanism to reduce likelihood of OOMEs caused by delayed deallocation.

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