Sift error: Could not allocate enough memory

Here is my code:
sift tmp.pgm

the size of the pgm is small enough. But result in a error:
sift: err: Could not allocate enough memory. (2)

please show code !
also: opencv version, os, etc.

thanks, i’ve already solved it by a workaround. Using OpenCV instead.