0

I want to run a program that requires more memory than what is available on the target machine. Unfortunately, I do not have root access to the machine where the program runs, so I cannot set up a classical swap file (dd + mkswap + swapon).

Is there any other way that would allow the program to run, without the aid from super-user?

  • 4
    On a generic Unix system? No. – Kusalananda Sep 6 '17 at 20:11
  • @Kusalananda In theory you could LD_PRELOAD a replacement for malloc and friends that map a file into memory instead of allocating memory from the OS. But that sounds complicated and slow. – Gilles Sep 6 '17 at 22:44
  • @Gilles Your comment set me on the right path! While I have the sources of the program, the memory consumption is due to a (complex) external numerical library that I do not have the guts to explore. But the library accepts a user-allocated workspace, which in turn can be allocated on disk via mmap. – jacob Sep 9 '17 at 9:06
0

If you are allowed to create virtual machines as unprivileged user then you may set up an environment with enough swap space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.