英文:
What features of java chronicle map uses to write the data on memory mapped files
问题
Java chronicle maps/queues将数据写入堆外内存。我试图理解为实现这一目标使用了Java的哪些特性。我曾以为chronicle只处理不安全的API,但不安全的API主要用于CAS操作。Java chronicle在将数据写入内存映射文件时使用了哪些其他Java特性。
英文:
Java chronicle maps/queues write data off the heaps. I am trying to understand what features of java are being used in order to achieve this. I was in assumption that chronicle deals with unsafe API only but unsafe is mostly used in CAS operations. What other feature of java chronicle uses in order to write data into memory-mapped files.
答案1
得分: 1
Chronicle Queue 使用 Unsafe
进行 CAS、volatile 和顺序操作,访问数据时将其视为 long
或 int
而不仅仅是 byte
,以及使用 64 位地址访问,以便映射大内存区域。我们还使用本地调用来映射 64 位区域。
英文:
Chronicle Queue uses Unsafe
for CAS, volatile and order operations, accessing data as long
or int
rather than just as byte
s and 64-bit address access so we can map large regions of memory. We also use a native
call to map 64-bit regions.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论