Repository navigation
Conversation
# Conflicts: # core/src/main/java/com/graphhopper/storage/MMapDataAccess.java
|
The cleaner method is rarely called. Can you ensure that if it is called that it works as expected? |
|
I can throw in a dedicated unit test if you prefer. |
|
@karussell done 😉 |
|
I meant the cleanMappedByteBuffer. Is it still doing the work it was previously doing? |
|
The only purpose of |
|
This may also benefit GraalVM compilation. Static method handles are supported. |
|
As the cleaner is only called when closing a GraphHopper instance there is no real measurable overhead in production. And in general we should get rid of the Unsafe usage as it is marked for removal. So I will close here. I have a branch that uses foreign memory API (java.lang.foreign.MemorySegment instead of MappedByteBuffer) and then one can just call |
I doubt this will easily work with the dynamic nature of our custom models (janino). I.e. to support AOT compilation a few manual tweaks would be still required (like initially creating the Java classes from the custom models). |
Avoids the reflection overhead on each call.