Issue
So recently i created this question: Run binary exe in python script without writing it to a disk
Just real quick, was it true what I said, or am I just really stupid?
Here's the edit I made:
The only problem is: that would take too much memory!
As I would have to resave the bytes (that are already in the main program) into an empty executable and run that, but then (if I take an example of the bytes being 1 gigabyte), this would happen:
1 gigabyte on disk (the program and the bytes as a variable in that program)
1 gigabyte on memory (to save the bytes as an executable on a ramdisk)
1 more gigabyte on memory (when the executable (of 1 gigabyte) is ren it will take 1 gigabyte of memory space)
Any fix for this?
If you don't understand the context then please read that question
So my question is: is it true that it will take double memory, and if so how do I fix this/are there any alternative's
(I'm talking about this RamDisk: https://stackoverflow.com/a/4353956/)
Solution
I think Memory Tempfile solves this (https://pypi.org/project/memory-tempfile/) (Source: https://stackoverflow.com/a/63547642/19566813)
Answered By - ThatGuy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.