4 ms·
Nice. Once I did some experiments at programming in Java using only sun.misc.Unsafe for a memory access: https://github.com/xonixx/gc_less https://github.com/x
by xonix 3y ago
Nice.
Once I did some experiments at programming in Java using only sun.misc.Unsafe for a memory access: https://github.com/xonixx/gc_less https://github.com/xonixx/gc_less. I was able to implement this way basic data structures (array, array list, hash table). I even explicitely set a very small heap and used Epsilon GC to make sure I don't allocate in heap.
Just recently I decided to check if it still works in the latest Java (23) and to my surprise it appears - it is. Now, apparently, this is going to change.
- kaba0 3y agoIt won’t change for many many years to come. It becomes deprecated, which just gives you a warning.
- pjmlp 3y agoSince Java 9, deprecations are actually removed, after a couple of LTS releases.
- kaba0 3y agoA couple of LTS releases is 2*n years, though.
- pjmlp 3y agoThe planned releases for removal are listed on the JEP. If they fail to provide parity, people will do like with modules, keeping holding to older Java versions longer than they should, use the escape command line options if available, turn back to JNI (the opposite this is trying to achieve), or move to other stack if they aren't that dependent on Java, e.g. ongoing Kafka ecosystem evolution.