Added check of memory_limit
Merge pull request #35 from airbone42/master

#3 Added check of memory_limit