How would I restrict RAM for one application?

I need to develop some software for an environment that has a LOT less RAM than our computers here do. We could spend money to buy a crap computer to test it on but it would be much more useful/efficient if I could test it on the same computer but just restrict how much RAM it gets. Is there a way to do that?

And in a similar vein: is there a way to also make the processor appear slower in executing that application as well?

You can specify the amount of RAM the machine is allowed to use, in the boot parameters, e.g.


You would type in this parameter at the GRUB menu.

why you could not use virtual machine for this? any xen virtualbox qemu or vmware?
afaik this is main thing why they was developed…

I thought of that, the only thing is, in developing, you want to make the environment as similar as possible so you don’t introduce new variables that might lead to issues which are different from the env. you’ll run it in or hide other issues. Running in virtualization is not 100% similar in terms of how the OS works with the hardware. It’s probably not an issue, but always something to be wary of…

you should not explain me :slight_smile: I am not a programmer and I did not understand a difference. It was just a suggestion… my friend use VM as a different platforms for compilling… So from this was my post…