gpt4 book ai didi

com - COINIT_SPEED_OVER_MEMORY 有什么作用?

转载 作者:行者123 更新时间:2023-12-04 06:30:17 26 4
gpt4 key购买 nike

打电话时CoInitializeEx ,您可以为 dwCoInit 指定以下值:

typedef enum tagCOINIT {
COINIT_MULTITHREADED = 0x0,
COINIT_APARTMENTTHREADED = 0x2,
COINIT_DISABLE_OLE1DDE = 0x4,
COINIT_SPEED_OVER_MEMORY = 0x8,
} COINIT;

暗示性标题为“内存速度”值的作用是什么?这些天在 COM 中被忽略了吗?

最佳答案

不知道它是否仍在使用,但它旨在改变 COM 算法使用的平衡。

如果您有大量内存并且不惜一切代价想要速度,您可以设置该标志。

在低内存环境中,关闭该标志将有利于减少内存使用。

事实证明,奇妙的Raymond Chen ("The Old New Thing" 名望)现在已经对这个主题进行了权衡,尽管这面旗帜的意图是什么,它显然什么也没做。

What does the COINIT_SPEED_OVER_MEMORY flag to CoInitializeEx do?更多细节:

When should you enable this mode? It doesn't matter, because as far as I can tell, there is no code anywhere in COM that changes its behavior based on whether the process has been placed into this mode! It looks like the flag was added when DCOM was introduced, but it never got hooked up to anything. (Or whatever code that had been hooked up to it never shipped.)



还有 http://archives.neohapsis.com/archives/microsoft/various/dcom/2001-q1/0160.html来自 Steve Swartz,最初的 COM+ 架构师之一:

COINIT_SPEED_OVER_MEMORY is ignored by COM.

关于com - COINIT_SPEED_OVER_MEMORY 有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/80160/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com