Out of memory

asked 2015-02-04 02:22:38 -0600

MRDaniel gravatar image

Hello,

I am running opencv on a laptop, with 8Gb of RAM. Task manager claims over 5000Mb are available, but when i call.

cv::Mat AllTextures = cv::Mat::zeros(nSamples, nPixels, CV_64FC1);

OpenCV Error: Insufficient memory (Failed to allocate 4208608612 bytes) in cv::O utOfMemoryError, file C:\builds\2_4_PackSlave-win32-vc11-shared\opencv\modules\c ore\src\alloc.cpp, line 52

4208608612 = 3.91957 Gb

5181Mb = 5.05957Gb

image description

Any clues as to what is happening here?

Windows 7 Visual Studio 2012

edit retag flag offensive close merge delete

Comments

1

Are you building a x64 bit application? If not, and you are using a x32 bit application, than you only have a working memory of 3.85 GB depending on your windows OS. Switch to a 64 bit application to use your full memory range!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-02-04 02:32:44 -0600 )edit
StevenPuttemans gravatar imageStevenPuttemans ( 2015-02-04 02:43:33 -0600 )edit