Using Protocol Buffers to serialize to off-heap memory

Ray Suliteanu
4 min readJan 2, 2021
Photo by Jordan Harrison on Unsplash

In my previous post about using off-heap memory in Java I showed how to set up a memory-mapped file. Now that we have a memory-mapped file, let’s write something to the file. There are different approaches to how to serialize Java objects obviously including the built-in Java serialization. But in this post I’m going to use Protocol Buffers (AKA protobuf) for serialization, because why not? It…

--

--