-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 hello Karl! my replies below, as per usual :) ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Tuesday, January 4, 2022 12:41 AM, k <gmkarl@gmail.com> wrote:
i was 'asked' to generalize my memmapping idea to work for every process on a system. this became relevant for me when doing a large build on an android phone.
*grin* i remember running full gnuradio toolchain builds on an ARM gumstick. gotta pull out all the stops!
after brief websearch, my approach was to fork microsoft's 'mimalloc' userspace allocator to provide for memmapping files on use. my fork is in the 'vmem' branch of https://github.com/xloem/mimalloc . it is a quick hack and may abort when subject to weird fork races etc. it also may let you run arbitrarily large processes on phones and raspberry pis.
it makes one swapfile per process,and only cleans the swapfile up if the process terminates normally (atext() call).
somebody with more systems experience than me could probably speed it up and stabilise it without much work....
i'll take a look later this week when i have some time. i'm curious to add compression to the file backed memory, as flash i/o is horribly slow, and compression may result in a net gain despite adding CPU load. (new embedded devices have more cores anyway, so this might not be bad) fun stuff, keep it up Karl! best regards, enjoy some nature too :) -----BEGIN PGP SIGNATURE----- iNUEAREKAH0WIQRBwSuMMH1+IZiqV4FlqEfnwrk4DAUCYdR0el8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NDFD MTJCOEMzMDdEN0UyMTk4QUE1NzgxNjVBODQ3RTdDMkI5MzgwQwAKCRBlqEfnwrk4 DJRkAP48YCOKzaCV5ceEXlwwzLH8cDLjUMgF8fnhUKNKEBeopQEAorJOqWZS7dri Wlo8H5mkPQQf8E3uSDX1sQuRt1kDXQk= =OAiS -----END PGP SIGNATURE-----