Skip to content
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

Segment fails to unmap when closing a very small GOL #100

Closed
clarisma opened this issue Mar 8, 2023 · 1 comment
Closed

Segment fails to unmap when closing a very small GOL #100

clarisma opened this issue Mar 8, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@clarisma
Copy link
Owner

clarisma commented Mar 8, 2023

OS: Windows 10

Attempting to truncate a GOL to its true size (16 KB) during closing fails:

Error while closing file (The requested operation cannot be performed on a file with a user-mapped section open)

However, Store.unmapSegments() completes successfully.

The problem does not manifest on other small-ish GOLs, such as Monaco (~ 1 MB)

@clarisma clarisma added the bug Something isn't working label Mar 8, 2023
@clarisma
Copy link
Owner Author

clarisma commented Mar 8, 2023

Problem is caused by Buildcontext.getTileCatalog(), which reads the tile index using its own MappedByteBuffer. This MappedByteBuffer is only unmapped when it is garbage collected -- but when building small files, there is not enough memory pressure, and hence GC never happens.

Proposed solution: Explicitly unmap the segment after use.

@clarisma clarisma transferred this issue from clarisma/geodesk Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant