Confusing Terms

From: gopan (gop_kumar_at_hotmail.com)
Date: 12/23/04


Date: 22 Dec 2004 23:00:31 -0800


>1)kmalloc and Vmalloc
>2)Vmalloc and ioremap

  kmalloc is normally used when you want contiguous memory of small
size (even thou you can ask for memory sizes up to 131072 bytes). The
allocation sizes can be 32, 64, ... 131072, and if the allocation is
successful you can be sure that the allocated memory is contiguous
physically.

vmalloc is used if you want large amount of memory contiguous
virtually but not physically.

ioremap is typically used to access memory mapped devices, ie we know
the physical address where they are mapped and want to create a
mapping for them in the page tables and get a virtual address so as to
access them.



Relevant Pages

  • Re: How to use vmalloc form kernel module
    ... > In the linux driver development book I read that I can use vmalloc to allocate ... I used vmalloc to get my memory and this was ... ioremap can be only called on physical non memory hardware addresses. ...
    (comp.os.linux.development.system)
  • [patch 3/4] mm: document missing fields for /proc/meminfo
    ... Memory which is actively being written back to the disk ... PageTables: amount of memory dedicated to the lowest level of page ... VmallocUsed: amount of vmalloc area which is used ...
    (Linux-Kernel)
  • Re: [PATCH 4/4] fdtable: Implement new pagesize-based fdtable allocation scheme.
    ... regardless of the size results in massive memory usage deltas. ... need the amortized power-of-two table area increase? ... I think that for such applications, the 'waste' of ram for fd table is ... vmalloc also tried to use power-of-two allocation sizes. ...
    (Linux-Kernel)
  • Re: hash table sizes
    ... Would it make sense to use vmalloc on these architectures. ... > distribute the memory references across as many nodes as possible - at least in theory. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [rfc][patch] dynamic resizing dentry hash using RCU
    ... So I introduce a new method for resizing hash tables with RCU, ... It should also be able to shrink under memory pressure, ... A pity it uses vmalloc memory for the moment. ... time is to add the possibility for vmallocto use hugepages ...
    (Linux-Kernel)