Messages in this thread | | | Date | Fri, 03 Oct 2008 11:05:30 -0500 | From | Christoph Lameter <> | Subject | Re: [patch 2/3] cpu alloc: Use in slub |
| |
Eric Dumazet wrote: > > Then maybe change MAX_NUMNODES to 0 or 1 to reflect > node[] is dynamically sized ?
See kmem_cache_init(). It only allocates the used bytes. If you only have a single nodes then only 1 pointer will be allocated.
#ifdef CONFIG_NUMA kmem_size = offsetof(struct kmem_cache, node) + nr_node_ids * sizeof(struct kmem_cache_node *); #else
That does not work for the statically allocated kmalloc array though.
| |