Re: hai

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any function that is exported in the kernel can be called from a module.
There is no list.  To learn about the functions that are available, you
should read source code that is related to what you are doing, read
books, and read any available documentation.

As for how to allocate memory:
- kmalloc(): Allocate some memory that is physically contiguous (and I
believe also virtually contiguous).  Should only be used for smaller
allocations.
- vmalloc(): Allocate some memory that is virtually contiguous, usually
used for larger allocations where there may not be enough contiguous
physical memory.
- alloc_pages(): return a number of virtually contiguous pages.
- __get_free_pages(): same as alloc_pages(), but returns the starting
address of the region instead of the page structure of the first page.
- alloc_page() / __get_free_page(): save as above 2 functions, but for
one page.

Avishay

On Sat, 2005-12-31 at 09:22 +0530, kishore wrote:
> hi all,
> 
>         Is there any function for memory allocation in kernel loadabale
> modules, other than kmalloc( ). Let me know, how can I have the list of
> functions related to kernel loadable modules say kmalloc( ),
> bcopy( ),memmove( ) etc.,
> 
>         Thanks in advance.
> 
> regards,
> kishore,packetware.
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux