解决OpenCV Error:Insufficient memory(Failed to allocate 1244164 bytes) in unknown function
从师兄那拷贝过来的代码,师兄的机器上可以运行,环境为Win7+OpenCV231,编译器为Debug Win32,拷贝到自己机器上运行时出现问题。
本机的运行环境为win10+OpenCV244,编译器为Debug Win32,一直提示如下错误:


根据错误提示“内存分配不足”
解决方法尝试:
①怀疑是OpenCV版本问题,将OpenCV换回231版本,结果不起作用;
②怀疑是单个程序运行分配内存不足,尝试扩大单个程序运行分配的内存,使用命令提示符,在管理员模式下运行,bcdedit /set increaseuserva 8192,结果发现运行出错的位置向前推进了,但最终依然还是内存不足;
③将编译器调整为Release x64,结果程序跑起来了,那叫一个激动啊;
④别被胜利冲昏了头脑,立即将编译器调整为Debug x64,程序也可以运行;
⑤在来验证一下bcdedit /set increaseuserva 8192是否有用,将程序运行内存设置为2G,bcdedit /set increaseuserva 2048,程序依然可以运行。
总结:
通过上面的测试,解决这个问题的方法是将编译器调整为x64环境下,也就是将程序编译成64位程序。
存在的疑问:为什么师兄的机器在win32编译器可以运行的,难道是与操作系统有关,求证。
解决OpenCV Error:Insufficient memory(Failed to allocate 1244164 bytes) in unknown function的更多相关文章
- OpenCV Error: Insufficient memory问题解析
前言 项目程序运行两个月之久之后突然挂了,出现OpenCV Error: Insufficient memory的错误,在此分析一下该问题. 问题的表现形式: 程序内存使用情况: 问题: OpenCV ...
- opencv error: insufficient memory错误解决办法
用opencv合成图像时出现的错误,大概4000多张会报错,在网上查阅一些博客时才知道原因.之前编译的时候用的是x86,切换到x64下可解决问题,具体: 1.项目->属性->配置管理器-& ...
- linux 下tomcat出现 Native memory allocation (malloc) failed to allocate 1915224064 bytes for committing reserved memory问题
## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocat ...
- 【已解决】ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked
官网说明: elasticsearch官网建议生产环境需要设置bootstrap.memory_lock: true 官网的解释 是:发生系统swapping的时候ES节点的性能会非常差,也会影响节点 ...
- 解决 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 问题
https://blog.csdn.net/weixin_41196185/article/details/81114226 今天在启动vue项目的时候报了这样一个错误 观察到关键词是 FATAL E ...
- Native memory allocation (mmap) failed to map 142606336 bytes for committing reserved memory.
这里写链接内容 问题描述 Java程序运行过程中抛出java.lang.OutOfMemoryError: unable to create new native thread,如下所示: [java ...
- Eclipse中启动Tomcat报错:[There is insufficient memory for the Java Runtime Environment to continue.]的解决方案
1,报错截图 2,报错信息 五月 08, 2018 9:57:58 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [Se ...
- tomcat启动报错There is insufficient memory for the Java Runtime Environment to continue
tomcat启动报错后显示以下错误 ## There is insufficient memory for the Java Runtime Environment to continue.# Nat ...
- 【已解决】Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8
[问题] 折腾: [已解决]Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8 过程中,增大对应AVD的内存为2G后,结果无法启 ...
随机推荐
- Eclipse 调整代码颜色的地方
Editors - Text Editors General-Apperance-Colors and Fonts 各工作区里面的Editor和Syntax Coloring
- 【leetcode】Word Ladder (hard) ★
Given two words (start and end), and a dictionary, find the length of shortest transformation sequen ...
- MVC 文件上传和图片剪辑
http://www.cnblogs.com/hinton/archive/2012/03/01/2375465.html http://gallery.kissyui.com/uploader/1. ...
- WPF之小动画二
上一篇文章简单介绍了动画的定义方法和一些控制动画的方法,并没有涉及复杂属性的动画处理方式,本文将继续动画的其它方面的使用. 写在前面(对于一些动画操作时候的建议): 1.如果希望某个元素从显示到消失, ...
- POJ1753——Flip Game
Flip Game Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on ...
- Upload/download/UrlConnection/URL
文件上传的核心点 1:用<input type=”file”/> 来声明一个文件域.File:_____ <浏览>. 2:必须要使用post方式的表单. 3:必须设置表单的类型 ...
- poj2823Sliding Window(线段树求最值)
链接 裸线段树 这题时间卡的挺棒 #include <iostream> #include<cstdio> #include<cstring> #include&l ...
- bzoj1412
比较裸的最小割 注意狼和羊的领地可以通过空地相连 ; dx:..] ,,,-); dy:..] ,,,); type node=record next,point ...
- usaco /the second wave
bzoj4582:简单递推题. #include<cstdio> #include<cstring> #include<iostream> #include< ...
- JDK7新特性之fork/join框架
The fork/join framework is an implementation of the ExecutorService interface that helps you take ad ...