I would like to share memory between C ++ and Python.
My problem:
- I work with large data sets (up to 6 GB of RAM) in C ++. All calculations are performed in C ++.
- Then I want to "paste" all my results into a Python program. But I can only write my data to disk, and then read this file from Python, which is inefficient.
Is there a way to "map" the memory corresponding to C ++ variables so that I can access data from Python? I do not want to copy 6 GB of data to the hard drive.
source
share