Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-08-2009, 11:02 PM   #1
LQ Newbie
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
how to dynamically allocate memory in a kernel modules?

As we know,wo can use malloc() to allocate memory in user space,but I also want to know how to do this in kernel mode?

Last edited by Triumphant; 12-08-2009 at 11:05 PM.
Old 12-08-2009, 11:19 PM   #2
Senior Member
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 209Reputation: 209Reputation: 209
Why, with kmalloc() of course! Here's some reading:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically loaded modules and statically loaded modules in linux gauthamk Linux - Software 1 05-18-2008 05:28 PM
Cannot allocate memory simha Linux - Newbie 4 01-23-2008 10:19 AM
dynamically loading modules that don't perryub Linux - Software 1 12-15-2004 05:44 AM
allocate more memory? sockknitter Debian 3 11-06-2004 06:23 PM
dynamically including C modules manjulap Programming 4 03-13-2002 04:00 AM

All times are GMT -5. The time now is 10:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration