解决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后,结果无法启 ...
随机推荐
- Android开发之onClick事件的三种写法(转)
package a.a; import android.app.Activity; import android.os.Bundle; import android.view.View; import ...
- Firefly 配置说明!
原地址:http://www.9miao.com/question-15-43023.html 下图一一个典型的config.json的配置:<ignore_js_op> "db ...
- Jetty实践-Hello World
该程序摘自官网教程: 1.首先去Jetty官网,下载jetty-distribution-9.2.6.v20141205.zip,Jetty Jar包,解压到任意目录: 2.使用Eclipse新建一个 ...
- 关于jsp页面是放在webroot目录下和web-inf下优缺点
CSDN问题: jsp放在webroot目录下 这样就可以让用户直接访问,jsp放在web-inf目录下就必须要通过请求才能访问.因此放在web-inf下jsp页面显得要安全. 既然这样 ,那是不是只 ...
- SPRING IN ACTION 第4版笔记-第九章Securing web applications-005-Applying LDAP-backed authentication
一. 1.This method is the LDAP analog to jdbcAuthentication() @Override protected void configure(Aut ...
- 在安装ISE的情况下,充分利用ISE的安装目录,查找资料
2013-06-22 11:03:02 在找资料时,通过官网输入关键字的方法找资料,有事会给出很多版本的链接.或者找不到,下面给出一种简便的方法,可以快速找到想要的资料. 如果要找ISE各个工具如pl ...
- 关于 mysqladmin
>mysqladmin 工具的使用格式: mysqladmin [option] command [command option] command ...... option 选项: -c nu ...
- 爬虫实现(hpricot)
1.基本代码 在gemfile中加入gem "hpricot",bundler install之后,在application.rb中require "hpricot&qu ...
- string evaluated instead to freemarker.template.SimpleScalar
[2015-09-06 09:07:32.879] ERROR [6B68DD09CE6FECFE20936CA3C6D560AD:http-bio-8087-exec-8] o.a.s.v.free ...
- Innodb 锁系列2 事务锁
上一篇介绍了Innodb的同步机制锁:Innodb锁系列1 这一篇介绍一下Innodb的事务锁,只所以称为事务锁,是因为Innodb为实现事务的ACID特性,而添加的表锁或者行级锁. 这一部分分两篇来 ...