没有足够的存储可用于完成此操作 - 程序或存储记忆? [英] Not enough storage is available to complete this operation - Program or Storage memory?

查看:152
本文介绍了没有足够的存储可用于完成此操作 - 程序或存储记忆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经得到了Windows Mobile应用程序使用.NET编写的CF 3.5来解决,而问题之一就是做存储。

消息没有足够的存储可用于完成此操作已经出现了几次 - 这是记录在SQL CE数据库,并且总是在数据存取操作(但数据访问不一样的位)

我稍微感到困惑的是,这是否指的是程序存储器(例如RAM)或存储内存(e..g永久存储)。它似乎是存储存储器,但是设备似乎有充足的自由。虽然有一些OutOfMemoryExceptions,这些看似风马牛不相及的这个问题(在这种情况发生在不同的时间,由于图像相关的问题)。

我们正在使用SQL CE 3.5与单个连接,其一起存储在设备上的应用程序(而不是存储卡)。该设备是摩托罗拉MC75运行Windows Mobile 6.1。

有什么想法?

解决方案

这是一个低级别的Windows错误,code 14,ERROR_OUTOFMEMORY。该错误消息并没有提到记忆,因为它并不总是导致的运行内存。最典型的触发是一个程序,超过了内核资源的配额。像万窗口句柄,还有很多其他的。这是为桌面版顺便说一句,我不怀疑这是在Windows Mobile。

低得多

那么,该程序是一个小猪。要触发这个错误的一种可能的方式是对实现IDisposable的类的对象不能调用Dispose()。这将消耗掉,不会被释放,直到垃圾收集和终结器线程运行的内核资源。这可能需要一段时间。在SQL CE类是当然的候选人。如果你不知道那里的资源泄漏或过度使用是从哪里来的,然后投资于CF的作品探查。

I've been given a Windows Mobile app written in .Net CF 3.5 to fix, and one of the problems is to do with storage.

The message 'Not enough storage is available to complete this operation' has appeared a few times - it's logged in the SQL CE database, and always happens during data access (but not the same bit of data access).

The thing I'm slightly confused about is whether this refers to Program Memory (e.g. RAM) or Storage Memory (e..g permanent storage). It would appear to be storage memory, but the devices seem to have plenty free. While there are some OutOfMemoryExceptions, these appear totally unrelated to this problem (in that that happen at a different time due to an image-related issue).

We're using SQL CE 3.5 with a single connection, which is stored along with the app on the device (as opposed to the storage card). The device is a Motorola MC75 running Windows Mobile 6.1.

Any thoughts?

解决方案

It is a low-level Windows error, code 14, ERROR_OUTOFMEMORY. The error message doesn't mention "memory" because it isn't always caused by running out of memory. The most typical trigger is a program exceeding its quota of kernel resources. Like 10,000 window handles, there are many others. That's for the desktop edition btw, I don't doubt it is much lower on Windows Mobile.

Well, the program is a piggy. One possible way to trigger this error is to not call Dispose() on objects of classes that implement IDisposable. That will consume kernel resources that won't be released until the garbage collector and finalizer thread run. Which could take a while. The SQL CE classes are certainly a candidate. If you have no clue where the resource leak or over-usage is coming from then invest in a profiler that works on CF.

这篇关于没有足够的存储可用于完成此操作 - 程序或存储记忆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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