-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SelectedSelectionKeySet.java throw UnsupportedOperationException #8242
Comments
@monkey1993 please share the code that you used. |
No code. Just see SelectedSelectionKeySet.java at line 62 |
@monkey1993 sure but why you even access this |
Reflection to get a object that contains all fields.Analyze memory footprin. |
Calculate each ChannelHandlerContext to occupy memory. |
@monkey1993 I still dont get why you need this... just take an heap-dump and use a heap-dump analyser. I mean I can implement |
Calculate objects and their subobjects to occupy memory. |
yeah and this is exactly what a heap-dump will give you and can be accessed via a heap-dump analyser like eclipse mat. |
like this public class Session { Calculate this object to occupy memory. |
it's will be---> _make(8) + long(8) + int(4) + boolean(1) + boolean(1) + ref(4) + padding(6) = 32byte. But no ChannelHandlerContext object is calculated. |
… and remove(...) Motivation: Our SelectedSelectionKeySet does not correctly implement various methods which can be done without any performance overhead. Modifications: Implement iterator(), contains(...) and remove(...) Result: Related to #8242.
@monkey1993 while I still not understand why you bother handrolling a memory profiler I did the changes as it was trivial to fix: PTAL |
I need to estimate the memory footprint of each object to make sure how many people my system can hold, and how it can expand when it expands. |
As you said, that's trivial, and I can still circumvent it to figure out how much memory an object occupies. |
Expected behavior
When I use reflection to get a obejct that contains all fields, and then, I input it's info when I iterate it . But,I find an error that is UnsupportedOperationException
Actual behavior
Steps to reproduce
Minimal yet complete reproducer code (or URL to code)
class SelectedSelectionKeySet.java
at line 62
Netty version
4.1.27
JVM version (e.g.
java -version
)8u172
OS version (e.g.
uname -a
)win7
The text was updated successfully, but these errors were encountered: