Cap'n Proto: Capturing a large message onto disk

I want to create a giant array of data arrays and save it to disk. I am using writePackedMessageToFd (). However, since the input is so large (50 GB), I need to collect pieces of the message on disk to free up memory.

Is this possible with the current version of Cap'n Proto?

Lateral note: this question differs from the mentioned duplicate question in that the output does not need to be streamed, for example. theoretically, there may be other options, such as a growing file that contains the entire (incomplete) message in the first pass. And a second pass can complete the message.

+4
source share
1 answer

, , , . , .

:

  • . Cap'n Proto , , .

  • . , mmap() . , . , . , . Cap'n Proto mmap ( mmap ), , : , , . mmap() , capnp::Orphanage::referenceExternalData(). , ; , . . .

+2

Source: https://habr.com/ru/post/1628184/


All Articles