频繁写入的iOS上的mmap性能(mmap performance on iOS with frequent writes)
我在绘图应用程序中使用iOS上的
mmap
函数。 我有一个使用mmap
的文件,然后从该内存中创建一个CGBitmapContext
。 用户可以用它们的手指在这个CGBitmapContext
上执行许多核心图形操作,这将导致内存不断更新。这种刷新频率多久会闪存到闪存存储器,这是闪存存储器还是性能问题? 我没有注意到我的测试有什么不好,但是我对
mmap
。I am using the
mmap
function on iOS in a drawing app. I have a file that usesmmap
and then I create aCGBitmapContext
from that memory. The user may perform many core graphics operations on thisCGBitmapContext
with their finger, which will cause the memory to be updated constantly.How often will this flush to the flash storage and is this a concern for wearing out the flash storage or for performance? I haven't noticed anything bad in my tests, but I am not familiar enough with
mmap
to know for sure.
原文:https://stackoverflow.com/questions/19742690
最满意答案
如果设置了
$_POST['search']
则$db->disconnect();
所以它无法在您的表单中运行查询。取
$db->disconnect();
超出你的if()
语句,并把它放在文件的末尾。If
$_POST['search']
is set, you$db->disconnect();
so it can't run the query in your form.Take the
$db->disconnect();
out of yourif()
statement, and put it at the end of the file.
相关问答
更多-
有一些API方法可用。 请参阅developer.mozilla.org 。 不过,我强烈建议您在依靠HTML5验证之前仔细思考。 在这个时候它肯定有一些主要的缺点,因为它仍处于“初期阶段”。 我现在说,你最好使用JS验证库; jQuery验证非常好。 There are some API methods available. See developer.mozilla.org. However, I would strongly advise you think carefully before rely ...