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.
精彩评论