内存不足,合同很少...... [英] Out of Memory with few contracts....

查看:63
本文介绍了内存不足,合同很少......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相对较小的程序集,代码合约的数量相对较少,但我的内存不足(下面的部分堆栈)。因为我正在添加合同,这让我关注VERT ....

I have a relatively small assembly, with a relatively few number of code contracts, yet I am getting out of memory (partial stack below). Because I am in the process of adding contracts, this has me VERT concerned....

CodeContracts:HardwareAbstraction:方法1的内部错误:NanoEtch.HardwareAbstraction.CatalogManagement.DefaultHardwareCatalog.Create()

CodeContracts:HardwareAbstraction:未捕获异常失败:类型为'System.OutOfMemoryException的异常抛出了。
$
CodeContracts:HardwareAbstraction:Stack trace:at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

CodeContracts:HardwareAbstraction:在Microsoft.Research.Abs​​tractDomains.Numerical.SubPolyhedra`2.DuplicateMe()

CodeContracts:HardwareAbstraction:at Microsoft.Research.Abs​​tractDomains.Numerical.SubPolyhedra`2.Clone()

CodeContracts:HardwareAbstraction:at Mi. crosoft.Research.CodeAnalysis.AnalysisWrapper.TypeBindings`11.GenericValueAnalysis`2.MutableVersion(AbstractDomain state)

...

CodeContracts: HardwareAbstraction: Internal error at method Method 1 : NanoEtch.HardwareAbstraction.CatalogManagement.DefaultHardwareCatalog.Create()
CodeContracts: HardwareAbstraction: Failed with uncaught exception: Exception of type 'System.OutOfMemoryException' was thrown.
CodeContracts: HardwareAbstraction: Stack trace: at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
CodeContracts: HardwareAbstraction: at Microsoft.Research.AbstractDomains.Numerical.SubPolyhedra`2.DuplicateMe()
CodeContracts: HardwareAbstraction: at Microsoft.Research.AbstractDomains.Numerical.SubPolyhedra`2.Clone()
CodeContracts: HardwareAbstraction: at Microsoft.Research.CodeAnalysis.AnalysisWrapper.TypeBindings`11.GenericValueAnalysis`2.MutableVersion(AbstractDomain state)
...

 

推荐答案

抱歉那个。

你能寄给我一个小的复制品吗?通过电子邮件,它会没事。

Can you send me a small repro? by email it will be fine.

获得repro的方法如下:

A way of getting a repro is the following one.

在额外的静态中添加-show progress选项检查器选项。

Add the -show progress option in the extra static checker options.

使用静态检查器构建并在输出窗口中观察消息,特别是导致溢出的方法。

Build with the static checker on and observe in the output window the messages, and in particular the method that causes the overflow.

将ContractVerification(false)属性添加到此类方法以跳过验证,直到我们修复它为止; - )

Add the ContractVerification(false) attribute to such method to skip the verification, until we've fixed it ;-)

 

Ciao

f


这篇关于内存不足,合同很少......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆