LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-18-2006, 05:34 AM   #1
draksonije
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
What functions can I use in Kernel mode


Hi,
I know I cand use standard library funcions such as stdio.h in kernel mode. What I dont know is what are the alternatives? More precisely I need alternative for stdlib.h malloc function .
Thanx Dragan
 
Old 03-18-2006, 08:46 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Many of the same functions exist, using the same names, but with the letter "k" before them.
Look at the man page for __kmalloc

Novel Press published a book "Linux Kernel Development" by Robert Love. There are also books available on kernel internals, and kernel devices that might interest you.

Also, there is documentation included with the kernel itself /usr/src/linux/Documentation/. Although it may be packaged separately by your distro under the name kernel-docs.
 
Old 03-18-2006, 12:50 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
jschiwal is right:

1. kmalloc is one alternative

2. Kernel 2.6 offers other alternatives, including the rich, powerful "slabs" API

3. Robert Love's "Linux Kernel Development, 2nd Ed" is an excellent book that discusses these -
and many other essential issues - in depth. It's an absolute must-have:
http://www.bookpool.com/sm/0672327201

4. Another, complementary book that's also a must-have is the O'Reilly "Linux Device Drivers, 3rd Ed":
http://www.bookpool.com/sm/0596005903

5. And of course - as jschiwal also said - the best reference is /usr/src/linux, starting with "Documentation/"!

Last edited by paulsm4; 03-18-2006 at 12:52 PM.
 
  


Reply



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
searching functions in emacs dire mode tacca Linux - Software 2 07-03-2005 03:49 PM
kernel functions sunfzam Linux - Software 14 04-10-2005 12:27 AM
kernel functions sunfzam Linux - Distributions 3 04-05-2005 02:52 PM
how to use c functions in linux kernel mode pwangee Linux - General 5 07-12-2004 10:21 PM
how to use c functions in linux kernel mode pwangee Linux - Software 2 07-11-2004 11:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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