rtl8188eu: Remove code for DBG_MEMORY_LEAK

The kernel does a better job.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-14 20:27:38 -06:00
parent f0f2a06c6d
commit d2b7e5be2d
4 changed files with 0 additions and 58 deletions

View file

@ -1052,26 +1052,6 @@ int proc_get_all_sta_info(char *page, char **start,
#endif
#ifdef DBG_MEMORY_LEAK
#include <asm/atomic.h>
extern atomic_t _malloc_cnt;;
extern atomic_t _malloc_size;;
int proc_get_malloc_cnt(char *page, char **start,
off_t offset, int count,
int *eof, void *data)
{
int len = 0;
len += snprintf(page + len, count - len, "_malloc_cnt=%d\n", atomic_read(&_malloc_cnt));
len += snprintf(page + len, count - len, "_malloc_size=%d\n", atomic_read(&_malloc_size));
*eof = 1;
return len;
}
#endif /* DBG_MEMORY_LEAK */
#ifdef CONFIG_FIND_BEST_CHANNEL
int proc_get_best_channel(char *page, char **start,
off_t offset, int count,

View file

@ -381,8 +381,6 @@
//#define DBG_HAL_INIT_PROFILING
//#define DBG_MEMORY_LEAK
//TX use 1 urb
//#define CONFIG_SINGLE_XMIT_BUF
//RX use 1 urb

View file

@ -373,12 +373,6 @@ extern u32 GlobalDebugLevel;
#endif
#ifdef DBG_MEMORY_LEAK
int proc_get_malloc_cnt(char *page, char **start,
off_t offset, int count,
int *eof, void *data);
#endif
#ifdef CONFIG_FIND_BEST_CHANNEL
int proc_get_best_channel(char *page, char **start,
off_t offset, int count,

View file

@ -35,12 +35,6 @@
#define RT_TAG '1178'
#ifdef DBG_MEMORY_LEAK
#include <asm/atomic.h>
atomic_t _malloc_cnt = ATOMIC_INIT(0);
atomic_t _malloc_size = ATOMIC_INIT(0);
#endif /* DBG_MEMORY_LEAK */
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
@ -83,13 +77,6 @@ inline u8* _rtw_vmalloc(u32 sz)
{
u8 *pbuf;
pbuf = vmalloc(sz);
#ifdef DBG_MEMORY_LEAK
if ( pbuf != NULL) {
atomic_inc(&_malloc_cnt);
atomic_add(sz, &_malloc_size);
}
#endif /* DBG_MEMORY_LEAK */
return pbuf;
}
@ -105,10 +92,6 @@ inline u8* _rtw_zvmalloc(u32 sz)
inline void _rtw_vmfree(u8 *pbuf, u32 sz)
{
vfree(pbuf);
#ifdef DBG_MEMORY_LEAK
atomic_dec(&_malloc_cnt);
atomic_sub(sz, &_malloc_size);
#endif /* DBG_MEMORY_LEAK */
}
u8* _rtw_malloc(u32 sz)
@ -123,15 +106,7 @@ u8* _rtw_malloc(u32 sz)
#endif
pbuf = kmalloc(sz,in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
#ifdef DBG_MEMORY_LEAK
if ( pbuf != NULL) {
atomic_inc(&_malloc_cnt);
atomic_add(sz, &_malloc_size);
}
#endif /* DBG_MEMORY_LEAK */
return pbuf;
}
@ -156,11 +131,6 @@ void _rtw_mfree(u8 *pbuf, u32 sz)
else
#endif
kfree(pbuf);
#ifdef DBG_MEMORY_LEAK
atomic_dec(&_malloc_cnt);
atomic_sub(sz, &_malloc_size);
#endif /* DBG_MEMORY_LEAK */
}
inline struct sk_buff *_rtw_skb_alloc(u32 sz)