我可以使用Windows驱动程序工具包构建PCRE C / C ++库吗? [英] Can I build the PCRE C/C++ library using Windows driver kits

查看:124
本文介绍了我可以使用Windows驱动程序工具包构建PCRE C / C ++库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PCRE / PCRE2 [ ^ ]库与WDK环境兼容?如果是的话,我该如何构建它们?



非常感谢!

Are the PCRE/PCRE2[^] libraries compatible with the WDK environments? If yes, how can I build them?

Thank you very much!

推荐答案

可能不是,因为它们很可能从未被设计为在内核中运行。唯一可以确定的方法是检查源代码。
Probably not, as they most likely have never been designed to run in the kernel. The only way to be sure would be to check the source code.


我知道上面的解决方案已被接受,但这里是Regex不属于内核模式的更好理由。 />


考虑一个简单的表达式,如A. * B ......任何以字母A开头并以字母B结尾的子字符串 - 中间为零个或多个字符。 />


现在考虑输入一百万个A然后一个B.



这是百万个潜在的匹配正则表达式模式匹配代码必须跟踪,直到它看到字母B.这需要大量的动态内存来跟踪所有这些潜在的匹配。



此类工作更适合用户模式。
I know the above solution was already accepted but here is a better reason why Regex does not belong in kernel mode.

Consider a simple expression like A.*B ... any substring that starts with the letter A and ends with the letter B - zero or more characters in between.

Now consider an input of one million A's followed by one B.

That's one million potential matches that the regex pattern matching code must track until it sees the letter B. That requires a lot of dynamic memory to track all these potential matches.

This type of work is more appropriate for user mode.


这篇关于我可以使用Windows驱动程序工具包构建PCRE C / C ++库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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