4

I'm using ocropus library for large images.

When I try to process 5000x4000pix image, MemoryError is raised.

I looked up an answer, but following answer is all that I found.

But, I am working on windows, and my servers are working on windows; therefore that solution does not work for me.

Is there an any parameters for Python, like -Xmx in Java?

Thank you, for your answers.

trincot
  • 317,000
  • 35
  • 244
  • 286
mkurnikov
  • 1,581
  • 2
  • 16
  • 19
  • 4
    I don't know about windows, but on linux python processes don't have a limit(unlike java). I used to do some pretty heavy processing and had processes grow to ~3~4GB heap size with not a single sign of trouble(except when the thing hits RAM size and the disks starts thrashing swapping things in and out, but that's expected) – entropy Mar 07 '13 at 15:00
  • 2
    Chances are, your problem is elsewhere, whatever processing you're doing with the image is causing you to run out of memory rather than the image itself. – entropy Mar 07 '13 at 15:01
  • It could be stack related. On Windows, `PyOS_CheckStack` is used in `PyEval_EvalFrameEx`, `PyObject_Repr`, `PyObject_Call`, etc. When it fails the caller raises a `MemoryError("stack overflow")`. – Eryk Sun Mar 07 '13 at 16:06

0 Answers0