Share your knowledge at the LQ Wiki.
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, 10: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 10:05 PM.
Old 12-08-2009, 10:19 PM   #2
Senior Member
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
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 04:28 PM
Cannot allocate memory simha Linux - Newbie 4 01-23-2008 09:19 AM
dynamically loading modules that don't perryub Linux - Software 1 12-15-2004 04:44 AM
allocate more memory? sockknitter Debian 3 11-06-2004 05:23 PM
dynamically including C modules manjulap Programming 4 03-13-2002 03:00 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:31 PM.

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
Open Source Consulting | Domain Registration