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

Update memory handling and pointer size calculations for JNA #23

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

lamba92
Copy link
Owner

@lamba92 lamba92 commented Dec 28, 2024

Replaced string-based memory allocation with UTF-8 encoded byte arrays for better compatibility and precision. Adjusted key and value length calculations to use the size of pointers instead of string lengths, ensuring correctness when working with native libraries. These changes improve robustness and prevent potential errors in memory operations.

@lamba92 lamba92 requested a review from Copilot December 28, 2024 23:55
@lamba92 lamba92 self-assigned this Dec 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • src/jvmCommonMain/kotlin/com/github/lamba92/leveldb/jvm/JvmLevelDB.kt: Language not supported
  • src/jvmCommonMain/kotlin/com/github/lamba92/leveldb/jvm/JvmUtills.kt: Language not supported
@lamba92 lamba92 force-pushed the native-memory-again branch 2 times, most recently from 2a4785a to 050b4da Compare December 29, 2024 00:57
Replaced string-based memory allocation with UTF-8 encoded byte arrays for better compatibility and precision. Adjusted key and value length calculations to use the size of pointers instead of string lengths, ensuring correctness when working with native libraries. These changes improve robustness and prevent potential errors in memory operations.
@lamba92 lamba92 force-pushed the native-memory-again branch from 050b4da to 349dd0e Compare December 29, 2024 00:58
@lamba92 lamba92 merged commit 27883d7 into master Dec 29, 2024
14 checks passed
@lamba92 lamba92 deleted the native-memory-again branch December 29, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant