I’ve been trying to figure out how to write a x86 GAS swap function for my program. I know its easier to do xchg or just write it C, but I want to be able to write it out anyways. On my 1st midterm we were given this as as swap function: but I receive a segmentation fault when running
Tag: swap
mkswap fails to create a file
I was attempting to create a swap file: I get “/var/swap No such file or directory” Am I supposed to create the file first? The documentation I found does not say that, so I am concerned. Answer Yes, you’ll need to create the file first. dd is the standard choice: this’d create a 128meg swap file.
Can I tell Linux not to swap out a particular processes’ memory?
Is there a way to tell Linux that it shouldn’t swap out a particular processes’ memory to disk? Its a Java app, so ideally I’m hoping for a way to do this from the command line. I’m aware that you can set the global swappiness to 0, but is this wise? Answer You can do this via the mlockall(2) system