没有足够的存储空间来完成此操作 - 程序或存储内存?

发布于 2024-09-02 13:27:09 字数 396 浏览 3 评论 0原文

我得到了一个用 .Net CF 3.5 编写的 Windows Mobile 应用程序来修复,其中一个问题与存储有关。

消息“没有足够的存储空间可用于完成此操作”出现了几次 - 它记录在 SQL CE 数据库中,并且总是在数据访问期间发生(但不是同一位数据访问)。

我有点困惑的是这是否指的是程序内存(例如RAM)还是存储内存(例如永久存储)。它似乎是存储内存,但设备似乎有足够的空闲空间。虽然存在一些 OutOfMemoryExceptions,但它们似乎与此问题完全无关(因为由于图像相关问题而在不同时间发生)。

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

有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

数理化全能战士 2024-09-09 13:27:09

这是一个低级 Windows 错误,代码 14,ERROR_OUTOFMEMORY。错误消息没有提及“内存”,因为它并不总是由内存不足引起。最典型的触发因素是程序超出其内核资源配额。像一万个窗把手一样,还有很多其他的。顺便说一句,这是针对桌面版的,我毫不怀疑它在 Windows Mobile 上要低得多。

嗯,这个程序是一只小猪。触发此错误的一种可能方法是不对实现 IDisposable 的类的对象调用 Dispose()。这将消耗在垃圾收集器和终结器线程运行之前不会释放的内核资源。这可能需要一段时间。 SQL CE 类当然是一个候选者。如果您不知道资源泄漏或过度使用从何而来,那么投资一个适用于 CF 的分析器。

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.

空城缀染半城烟沙 2024-09-09 13:27:09

分配了多少虚拟内存?如果可能的话尝试增加该值。

How much virtual memory is allocated? Try increasing the value if possible.

山田美奈子 2024-09-09 13:27:09

我不知道这是否也适用于 MC75,但是在开始->设置->控制面板->系统上应该有一个内存选项卡,您可以在其中调整内存大小可用作 RAM,以及保留多少用于存储文件。

这不适用于 \Permanent Storage 文件夹(或 \Storage Card,因为它在我们的设备上被称为),但适用于其他文件夹,例如 \Temp。

I don't know if this also applies for MC75, but on Start->Settings->Control Panel->System there should be a Memory tab, where you can adjust how much memory is available as RAM, and how much is reserved for storing files.

This does not apply to the \Permanent Storage folder (or \Storage Card, as it's called on our device), but to the other folders, like \Temp.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文