question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feautre request] Add a util method to get maxDirectMemory

See original GitHub issue

Netty’s PlatformDependent.maxDirectMemory() is powerful and general. In other project, we want to read the maxDirectMemory too. But we can’t directly use PlatformDependent.maxDirectMemory() , because it will wrong if user set io.netty.maxDirectMemory greater than zero. Instead of copy and paste netty’s code(Under Apache License), I want a UtilityClass to get PlatformDependent.maxDirectMemory0 result.

I am not very familiar with netty code, I can work on this under guides.

Thanks for your help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisvestcommented, Feb 16, 2022

@normanmaurer @franz1981 I don’t see a big problem in exposing maxDirectMemory0 as estimateMaxDirectMemory.

1reaction
johnoucommented, Feb 18, 2022

technically it wouldn’t even be part of the public API, last I recall PlatformDependent is in the “internal” package, that said could annotate it as UnstableApi?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to find a root cause of the following netty error: io.netty.util ...
According to the code from Class io.netty.util.internal. ... In this case the // "practical max direct memory" would be 2 * max memory...
Read more >
java.lang.OutOfMemoryError: Java heap space - Druid Forum
When I do the following config changes in druid Historicals service, what I expect is to ingest data of 60 million rows but...
Read more >
java - Oracle Help Center
The arguments passed to the main() method separated by spaces. Description. The java command starts a Java application. It does this by starting...
Read more >
JDK-4947273 (coll) Create a standard Pair class ... - Bug ID
Component: core-libs | Sub-Component: java.util:collections. ... JUSTIFICATION : This class is simple to write and would go a long way towards making code ......
Read more >
Basic cluster tuning - Apache Druid
If you have questions on tuning Druid for specific use cases, ... both services have to process cluster-wide state and answer API requests...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found