开发者

This code will cause kernel level memory leaks, what is the difference between this and user land memory leaks

void foo()
{
    char *var = kmalloc(1, GFP_KERNEL);
    return;
}

This code will cause kernel level memory leaks, what is the difference between this and user land memory leaks

This is a question from a interview today. I did bad about this开发者_如何学Go question.Can anyone give any thoughts?


Memory leaked in userspace is reclaimed at process termination, but memory leaked in kernel space cannot be reclaimed until the machine is rebooted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜