lkml.org 
[lkml]   [2008]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/15] kmemleak: Add the base support
Hello.

I have a question. (may be silly)

> +/*
> + * Insert a pointer into the pointer hash table.
> + */
> +static inline void create_object(unsigned long ptr, size_t size, int ref_count)
> +{
> + unsigned long flags;
> + struct memleak_object *object;
> + struct prio_tree_node *node;
> + struct stack_trace trace;
> +
> + object = kmem_cache_alloc(object_cache, GFP_ATOMIC);
> + if (!object)
> + panic("kmemleak: cannot allocate a memleak_object structure\n");

IIRC, GFP_ATOMIC allocation sometimes fails. (ex. when page cache occupies all
area). It seems to be easy to panic. Is it intended?


Thanks.
--
Yasunori Goto




\
 
 \ /
  Last update: 2008-12-01 06:41    [W:0.193 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site