Skip to content

Add auto_unlink flag to delete the mapped file after data got gc'd#6

Open
hirschenberger wants to merge 1 commit intokrestenkrab:masterfrom
hirschenberger:master
Open

Add auto_unlink flag to delete the mapped file after data got gc'd#6
hirschenberger wants to merge 1 commit intokrestenkrab:masterfrom
hirschenberger:master

Conversation

@hirschenberger
Copy link

I'm using this functionality to speed up data transfer of big binary data via the file-based shared-memory area in /run/shm/... instead of sidio-based ports. I only transfer the path and the size of the binary in a tuple and mmap the file in direct mode.
With auto_unlink enabled, the file (and it's memory) is freed automatically when the binary gets gc'd.

With this transport I get a speedup of ~70% to stdio ports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant