Luis Sena
Apr 25, 2022

--

Hi Bernardo,

Yeah, usually I only use arrays or a dict pointing to those arrays (in that case, the dict memory footprint is very small since it only holds references).

If you really need to share a dictionary, I think you can use this lib:

https://github.com/luizalabs/shared-memory-dict

I never tried, but it should should have the behaviour you're looking for since it allocates dictionaries in shared memory.

Other options could be:

- using mmap to a pickle of your dict

- using sqlite (this is lightweight embedded database)

Let me know if you're able to solve it!

--

--

No responses yet