Increase memory in Pydev using run configurations
Python requires no such flag (so, not really PyDev related).
Python (unlike java), will happily use all the memory you have available in your computer, so, in this case, your algorithm is really using up all the memory it can.
Note that if you are running a Python which is compiled in 32 bits, the max memory you'll have for the process is 2GB. If you need more memory (and have it available in your computer), you need to use a 64-bit compiled Python (usually marked as x86_64).
I'm working on indexing system and I need so much of ram, as I know in java we can pass some parameter to JVM to increase the heap size, but in python I couldn't figure out it how, and every time I run my application I get MemoryError after indexing ten thousands documents.