root/include/linux/malloc.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_MALLOC_H
   2 #define _LINUX_MALLOC_H
   3 
   4 #include <linux/config.h>
   5 
   6 #ifdef CONFIG_DEBUG_MALLOC
   7 #define kmalloc(a,b) deb_kmalloc(__FILE__,__LINE__,a,b)
   8 #define kfree_s(a,b) deb_kfree_s(__FILE__,__LINE__,a,b)
   9 
  10 void *deb_kmalloc(const char *deb_file, unsigned short deb_line,unsigned int size, int priority);
  11 void deb_kfree_s (const char *deb_file, unsigned short deb_line,void * obj, int size);
  12 void deb_kcheck_s(const char *deb_file, unsigned short deb_line,void * obj, int size);
  13 
  14 #define kfree(a) deb_kfree_s(__FILE__,__LINE__, a,0)
  15 #define kcheck(a) deb_kcheck_s(__FILE__,__LINE__, a,0)
  16 #define kcheck_s(a,b) deb_kcheck_s(__FILE__,__LINE__, a,b)
  17 
  18 #else /* !debug */
  19 
  20 void * kmalloc(unsigned int size, int priority);
  21 void kfree_s(void * obj, int size);
  22 
  23 #define kcheck_s(a,b) 0
  24 
  25 #define kfree(x) kfree_s((x), 0)
  26 #define kcheck(x) kcheck_s((x), 0)
  27 
  28 #endif
  29 
  30 #endif /* _LINUX_MALLOC_H */

/* [previous][next][first][last][top][bottom][index][help] */