search for: debug_smb_malloc

Displaying 1 result from an estimated 1 matches for "debug_smb_malloc".

1998 Sep 04
0
Linux SMB Mount utils patch
...l)), (__u16 *)((__u8 *)(buf) + (pos))) +#define DSET(buf,pos,val) \ +put_unaligned(cpu_to_le32((__u32)(val)), (__u32 *)((__u8 *)(buf) + (pos))) + +/* where to find the base of the SMB packet proper */ +#define smb_base(buf) ((__u8 *)(((__u8 *)(buf))+4)) + +#include <linux/vmalloc.h> + +#ifdef DEBUG_SMB_MALLOC + +extern int smb_malloced; +extern int smb_current_vmalloced; + +static inline void * +smb_vmalloc(unsigned int size) +{ + smb_malloced += 1; + smb_current_vmalloced += 1; + return vmalloc(size); +} + +static inline void +smb_vfree(void *obj) +{ + smb_current_vmalloced...