mm/sl[uo]b: export __kmalloc_track(_node)_caller
slab does this already, and I want to use this in a memory allocation tracker in drm for stuff that's tied to the lifetime of a drm_device, not the underlying struct device. Kinda like devres, but for drm. Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-2-daniel.vetter@ffwll.ch
This commit is contained in:
parent
0e8003076a
commit
fd7cb5753e
|
@ -524,6 +524,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller)
|
|||
{
|
||||
return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller);
|
||||
}
|
||||
EXPORT_SYMBOL(__kmalloc_track_caller);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
void *__kmalloc_node_track_caller(size_t size, gfp_t gfp,
|
||||
|
@ -531,6 +532,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfp,
|
|||
{
|
||||
return __do_kmalloc_node(size, gfp, node, caller);
|
||||
}
|
||||
EXPORT_SYMBOL(__kmalloc_node_track_caller);
|
||||
#endif
|
||||
|
||||
void kfree(const void *block)
|
||||
|
|
|
@ -4358,6 +4358,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller)
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(__kmalloc_track_caller);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
|
||||
|
@ -4388,6 +4389,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(__kmalloc_node_track_caller);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
|
|
Loading…
Reference in New Issue