Best way to "mangle" (represent) the memory

I would like to know what would be the best way to map/represent the memory. I mean, how to describe, for example, a structure with all its field to be serialized.

I am creating a RPC library that will create the client and server using the dwarf debug data, so i need to create a function wrapper to serialize and deserialize the functions´s parameters.

Now, i am using the gcc mangling types to identify all the fields, but the compiler sometimes creates holes to optimize the memory access time;

DwarfDumpIDE

Any idea ?

Upvotes: 0

Views: 117

Answers (1)

Mikhail
Mikhail

Reputation: 8038

I use the "cereal" library for serialization (http://uscilab.github.io/cereal/)

Alternatives include Google's Protocol Buffers, although I found it too difficult to integrate for my comparably simple serialization tasks.

For communication between processes, and languages, I've had a good experience with ZeroC's ICE library (https://zeroc.com/products/ice). You specific the structure as an external compilation step similar to Google's Protocol Buffers. The nice part is that the network connect was also taken care off.

Upvotes: 1

Related Questions