Tiny Core Extensions > TCE Talk
upx for large executables?
Rich:
Hi GNUser
I think an executable in a squash file system can load
only the code it needs as it's executing because the
the driver decompresses and fetches the data for the
operating system transparently.
I suspect UPX basically creates a self extracting compressed
file with a loader. This suggests the entire file gets loaded
immediately into RAM even if all sections of code are not
yet (or ever) needed.
GNUser:
--- Quote from: Rich on May 16, 2024, 05:39:30 PM ---I suspect UPX basically creates a self extracting compressed
file with a loader.
--- End quote ---
Hi Rich. Based on my cursory reasearch that sounds about right.
--- Quote from: Rich on May 16, 2024, 05:39:30 PM ---This suggests the entire file gets loaded
immediately into RAM even if all sections of code are not
yet (or ever) needed.
--- End quote ---
Yikes. We definitely don't want that.
It's so easy to just focus on the size of the extension and get carried away into all kinds of trouble!
CardealRusso:
--- Quote from: GNUser on May 16, 2024, 05:36:33 PM ---...Tweaking block size has been discussed before...
--- End quote ---
I may be mistaken but the discussion (which I took part in) was about changing the default block size, not specific cases.
I hope to hear from an administrator, as I'm also interested.
hiro:
increasing the block size will lead to more stuff being loaded into ram unnecessarily. there's a good reason it's at 4k right now.
more useful would be to figure out how to minimize data getting cached twice (once in compressed form and once uncompressed).
but there's diminishing returns in all of this. our current system is plenty good already, maybe find something else to hack on :P
curaga:
--- Quote from: CardealRusso on May 16, 2024, 05:54:45 PM ---I may be mistaken but the discussion (which I took part in) was about changing the default block size, not specific cases.
I hope to hear from an administrator, as I'm also interested.
--- End quote ---
The block size was fixed at 4k for the 32bit platforms, but larger sizes are acceptable on the 64-bit ones. The RAM hit is quite different on a 64mb system vs a 4gb one. That is, if you're maintaining some big extension for x86-64 or arm64, and it significantly benefits, it's fine to send it with a larger block size.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version