bcmsdh = (bcmsdh_info_t *) MALLOC(osh, sizeof(bcmsdh_info_t));
if (bcmsdh == NULL) {
- BCMSDH_ERROR(("bcmsdh_attach: out of memory, "
- "malloced %d bytes\n", MALLOCED(osh)));
+ BCMSDH_ERROR(("bcmsdh_attach: out of memory"));
return NULL;
}
bzero((char *)bcmsdh, sizeof(bcmsdh_info_t));
}
sdhc = MALLOC(osh, sizeof(bcmsdh_hc_t));
if (!sdhc) {
- SDLX_MSG(("%s: out of memory, allocated %d bytes\n",
- __func__, MALLOCED(osh)));
+ SDLX_MSG(("%s: out of memory\n", __func__));
goto err;
}
bzero(sdhc, sizeof(bcmsdh_hc_t));
}
sdhc = MALLOC(osh, sizeof(bcmsdh_hc_t));
if (!sdhc) {
- SDLX_MSG(("%s: out of memory, allocated %d bytes\n",
- __func__, MALLOCED(osh)));
+ SDLX_MSG(("%s: out of memory\n", __func__));
goto err;
}
bzero(sdhc, sizeof(bcmsdh_hc_t));
sd = (sdioh_info_t *) MALLOC(osh, sizeof(sdioh_info_t));
if (sd == NULL) {
- sd_err(("sdioh_attach: out of memory, malloced %d bytes\n",
- MALLOCED(osh)));
+ sd_err(("sdioh_attach: out of memory\n"));
return NULL;
}
bzero((char *)sd, sizeof(sdioh_info_t));
void dhd_osl_detach(osl_t *osh)
{
- if (MALLOCED(osh)) {
- DHD_ERROR(("%s: MEMORY LEAK %d bytes\n", __func__,
- MALLOCED(osh)));
- }
osl_detach(osh);
}
#define MALLOC(osh, size) osl_malloc((osh), (size))
#define MFREE(osh, addr, size) osl_mfree((osh), (addr), (size))
-#define MALLOCED(osh) osl_malloced((osh))
extern void *osl_malloc(osl_t *osh, uint size);
extern void osl_mfree(osl_t *osh, void *addr, uint size);
-extern uint osl_malloced(osl_t *osh);
#define NATIVE_MALLOC(osh, size) kmalloc(size, GFP_ATOMIC)
#define NATIVE_MFREE(osh, addr, size) kfree(addr)
}
#endif /* WLC_HIGH_ONLY */
- if (osl_malloced(osh)) {
- printf("**** Memory leak of bytes %d\n", osl_malloced(osh));
- ASSERT(0 && "Memory Leak");
- }
-
osl_detach(osh);
}
task = osl_malloc(wl->osh, sizeof(wl_task_t));
if (!task) {
- WL_ERROR(("wl%d: wl_schedule_task: out of memory, malloced %d bytes\n", wl->pub->unit, osl_malloced(wl->osh)));
+ WL_ERROR(("wl%d: wl_schedule_task: out of memory\n", wl->pub->unit));
return -ENOMEM;
}
t = osl_malloc(wl->osh, sizeof(wl_timer_t));
if (!t) {
- WL_ERROR(("wl%d: wl_init_timer: out of memory, malloced %d bytes\n", wl->pub->unit, osl_malloced(wl->osh)));
+ WL_ERROR(("wl%d: wl_init_timer: out of memory\n", wl->pub->unit));
return 0;
}
item = MALLOC(osh, size);
if (item == NULL)
- WL_ERROR(("wl%d: %s: out of memory, malloced %d bytes\n",
- unit, __func__, MALLOCED(osh)));
+ WL_ERROR(("wl%d: %s: out of memory\n", unit, __func__));
else
bzero((char *)item, size);
return item;
ampdu = (ampdu_info_t *) MALLOC(wlc->osh, sizeof(ampdu_info_t));
if (!ampdu) {
- WL_ERROR(("wl%d: wlc_ampdu_attach: out of mem, malloced %d bytes\n", wlc->pub->unit, MALLOCED(wlc->osh)));
+ WL_ERROR(("wl%d: wlc_ampdu_attach: out of mem\n", wlc->pub->unit));
return NULL;
}
bzero((char *)ampdu, sizeof(ampdu_info_t));
asi = (antsel_info_t *) MALLOC(osh, sizeof(antsel_info_t));
if (!asi) {
- WL_ERROR(("wl%d: wlc_antsel_attach: out of mem, malloced %d bytes\n", pub->unit, MALLOCED(osh)));
+ WL_ERROR(("wl%d: wlc_antsel_attach: out of mem\n", pub->unit));
return NULL;
}
wlc_cm = (wlc_cm_info_t *) MALLOC(pub->osh, sizeof(wlc_cm_info_t));
if (wlc_cm == NULL) {
- WL_ERROR(("wl%d: %s: out of memory, malloced %d bytes",
- pub->unit, __func__, MALLOCED(pub->osh)));
+ WL_ERROR(("wl%d: %s: out of memory", pub->unit, __func__));
return NULL;
}
bzero((char *)wlc_cm, sizeof(wlc_cm_info_t));
physhim = (wlc_phy_shim_info_t *)MALLOC(wlc_hw->osh,
sizeof(wlc_phy_shim_info_t));
if (!physhim) {
- WL_ERROR(("wl%d: wlc_phy_shim_attach: out of mem, malloced %d bytes\n", wlc_hw->unit, MALLOCED(wlc_hw->osh)));
+ WL_ERROR(("wl%d: wlc_phy_shim_attach: out of mem\n", wlc_hw->unit));
return NULL;
}
bzero((char *)physhim, sizeof(wlc_phy_shim_info_t));
di = MALLOC(osh, sizeof(dma_info_t));
if (di == NULL) {
#ifdef BCMDBG
- printf("dma_attach: out of memory, malloced %d bytes\n",
- MALLOCED(osh));
+ printf("dma_attach: out of memory\n");
#endif
return NULL;
}
size = ntxd * sizeof(void *);
di->txp = MALLOC(osh, size);
if (di->txp == NULL) {
- DMA_ERROR(("%s: dma_attach: out of tx memory, malloced %d bytes\n", di->name, MALLOCED(osh)));
+ DMA_ERROR(("%s: dma_attach: out of tx memory\n", di->name));
goto fail;
}
bzero((char *)di->txp, size);
size = nrxd * sizeof(void *);
di->rxp = MALLOC(osh, size);
if (di->rxp == NULL) {
- DMA_ERROR(("%s: dma_attach: out of rx memory, malloced %d bytes\n", di->name, MALLOCED(osh)));
+ DMA_ERROR(("%s: dma_attach: out of rx memory\n", di->name));
goto fail;
}
bzero((char *)di->rxp, size);
kfree(addr);
}
-uint osl_malloced(osl_t *osh)
-{
- ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
- return osh->malloced;
-}
-
uint osl_dma_consistent_align(void)
{
return PAGE_SIZE;
/* alloc pcicore_info_t */
pi = MALLOC(osh, sizeof(pcicore_info_t));
if (pi == NULL) {
- PCI_ERROR(("pci_attach: malloc failed! malloced %d bytes\n",
- MALLOCED(osh)));
+ PCI_ERROR(("pci_attach: malloc failed!\n"));
return NULL;
}
/* alloc si_info_t */
sii = MALLOC(osh, sizeof(si_info_t));
if (sii == NULL) {
- SI_ERROR(("si_attach: malloc failed! malloced %d bytes\n",
- MALLOCED(osh)));
+ SI_ERROR(("si_attach: malloc failed!\n"));
return NULL;
}