I have a system with 16GB of memory. I run a python script for some data mining application and the process takes up the entire 16GB. I want to limit the python process to take up only a limited amount of memory.
Is it possible to do this? If yes, how?
Update:
The application retrieves hotel review data from a huge database and tries to build graphs among hotels and users for some analysis. The data structure to hold the data goes beyond 16GB.
ulimit(see stackoverflow.com/questions/1760025/limit-python-vm-memory)ulimit), but this will cause the application to fail when it reaches the limit. It is a design flaw of the application if it is taking up 16GB of memory, and you haven't given us any details of the application, and therefore we don't have enough information to help you solve it.