什么是内核相当于宏memset的? [英] What would be the kernel equivalent macro to memset?

查看:1442
本文介绍了什么是内核相当于宏memset的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我书面方式要求我明确分配给零的全部内存的驱动程序。 MEMSET是一个用户空间的功能,但我想知道,如果内核提供了一个宏可以帮助我做到这一点。

I'm writting a driver that requires me to clear all the memory allocated to zero. Memset is a userspace function, but I would like to know if the kernel provides a macro that helps me do this.

感谢

推荐答案

据的此线程和这里的人们评论说,都用它, memset的的内核code可用。也许你只是忘了。

According to this thread and people commenting here that have used it, memset is available in kernel code. Maybe you just forgot to

#include <string.h>

这篇关于什么是内核相当于宏memset的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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