Comment by chii
25 days ago
> extracting it to a tmp file
i wonder if there's a way to do this entirely in memory? Because some deployment scenarios might not have disk space at all.
25 days ago
> extracting it to a tmp file
i wonder if there's a way to do this entirely in memory? Because some deployment scenarios might not have disk space at all.
Technically memfd_create will let you create a file descriptor backed by a memory region. However in Linux I don't believe there's a way to dlopen that. (Maybe dlopen /dev/fd/... might work?) In FreeBSD there's a fdlopen library function.
Edit: glibc proposal which was never accepted: https://sourceware.org/bugzilla/show_bug.cgi?id=11767
/tmp is often a RAM disk in such cases
not with java - it needs a path. Of course if you have a ram disk (e.g. /tmp) it'd do the job.