Skip to content

Invalid memory configuration for netty maxDirectMemory in native image #17839

@antonwiens

Description

@antonwiens

I thinks this only concerns native image builds.

Setting either
-XX:MaxDirectMemorySize
or
-Dio.netty.maxDirectMemory
does not work at runtime and runtime memory is incorrectly reflected in io.netty.util.internal.PlatformDependent.DIRECT_MEMORY_LIMIT
at runtime.

i think the problem is that io.netty.buffer.PooledByteBufAllocator uses io.netty.util.internal.PlatformDependent
which is not initialized during runtime but build time.

I tested this with Quarkus 1.10.5.Final, but looking at the current code of NettyProcessor shows that PlatformDependent is still not initialized at runtime, only PooledByteBufAllocator is.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions