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

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