Ask Your Question

Revision history [back]

Out of Memory (but I have too much memory!)

Hi everyone, I got an "out of memory" problem, my program needs to read and describe almost 30.000 (yes three thousand!) images using SIFT descriptor. For each read image I find the keypoints, describe them in a num_keypointsx128 cv::Mat object and concatenate this one on other big matrix with push_back() function. When my program gets almost the 26.000th image it crashes with an "out of memory" error!

I know there are too many images, but my surprise is that I'm running this program on a cluster computer with Ubuntu operating system with almost 50GB of memory and 16 processors (a virtual Machine in Microsoft Azure) so the problem ISN'T memory, I'm sure about it. I ran "htop" command and my program have not used 10% of total available memory.

Why am I getting this "out of memory" error? Should I allocate the cv::Mat object using "malloc()" function?

Out of Memory (but I have too much memory!)

Hi everyone, I got an "out of memory" problem, my program needs to read and describe almost 30.000 (yes three thirty thousand!) images using SIFT descriptor. For each read image I find the keypoints, describe them in a num_keypointsx128 cv::Mat object and concatenate this one on other big matrix with push_back() function. When my program gets almost the 26.000th image it crashes with an "out of memory" error!

I know there are too many images, but my surprise is that I'm running this program on a cluster computer with Ubuntu operating system with almost 50GB of memory and 16 processors (a virtual Machine in Microsoft Azure) so the problem ISN'T memory, I'm sure about it. I ran "htop" command and my program have not used 10% of total available memory.

Why am I getting this "out of memory" error? Should I allocate the cv::Mat object using "malloc()" function?