当前位置: 首页>>代码示例>>C++>>正文


C++ os_memoryFree函数代码示例

本文整理汇总了C++中os_memoryFree函数的典型用法代码示例。如果您正苦于以下问题:C++ os_memoryFree函数的具体用法?C++ os_memoryFree怎么用?C++ os_memoryFree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了os_memoryFree函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sme_Destroy

/** 
 * \fn     sme_Destroy
 * \brief  Destroys the SME object. De-allocates system resources
 * 
 * Destroys the SME object. De-allocates system resources
 * 
 * \param  hSme - handle to the SME object
 * \return None
 * \sa     sme_Create
 */ 
void sme_Destroy (TI_HANDLE hSme)
{
    TSme        *pSme = (TSme*)hSme;

    /* destroy the scan result table */
    if (NULL != pSme->hScanResultTable)
    {
        scanResultTable_Destroy (pSme->hScanResultTable);
    }

    /* destroy the SME generic state machine */
    if (NULL != pSme->hSmeSm)
    {
        genSM_Unload (pSme->hSmeSm);
    }

    /* free the SME object */
    os_memoryFree (pSme->hOS, hSme, sizeof (TSme));
}
开发者ID:CyanogenDefy,项目名称:android_system_wlan_ti,代码行数:29,代码来源:sme.c

示例2: cmdHndlr_Destroy

/** 
 * \fn     cmdHndlr_Destroy
 * \brief  Destroy the module object
 * 
 * Destroy the module object.
 * 
 * \note   
 * \param  hCmdHndlr - The object                                          
 * \return TI_OK 
 * \sa     
 */ 
TI_STATUS cmdHndlr_Destroy (TI_HANDLE hCmdHndlr, TI_HANDLE hEvHandler)
{
    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;

	if (pCmdHndlr->hCmdInterpret)
	{
		cmdInterpret_Destroy (pCmdHndlr->hCmdInterpret, hEvHandler);
	}


	if (pCmdHndlr->hCmdQueue)
	{
		que_Destroy (pCmdHndlr->hCmdQueue);
	}

	os_memoryFree (pCmdHndlr->hOs, hCmdHndlr, sizeof(TCmdHndlrObj));

    return TI_OK;
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel,代码行数:30,代码来源:CmdHndlr.c

示例3: release_module

/***********************************************************************
 *                        release_module									
 ***********************************************************************
DESCRIPTION:	Release all module resources - FSMs, timer and object.
                                                                                                   
INPUT:      hConn	-	Connection handle.

OUTPUT:		

RETURN:     void

************************************************************************/
static void release_module(conn_t *pConn)
{
	if (pConn->ibss_pFsm)
    {
		fsm_Unload (pConn->hOs, pConn->ibss_pFsm);
    }

    if (pConn->infra_pFsm)
    {
		fsm_Unload (pConn->hOs, pConn->infra_pFsm);
    }

	if (pConn->hConnTimer)
    {
		tmr_DestroyTimer (pConn->hConnTimer);
    }

	os_memoryFree(pConn->hOs, pConn, sizeof(conn_t));
}
开发者ID:aleho,项目名称:ti_wilink,代码行数:31,代码来源:conn.c

示例4: mainSec_unload

/**
*
* mainSec_config
*
* \b Description: 
*
* Init main security state machine state machine
*
* \b ARGS:
*
*  none
*
* \b RETURNS:
*
*  TI_OK on success, TI_NOK otherwise.
*
* \sa 
*/
TI_STATUS mainSec_unload(mainSec_t *pMainSec)
{
    TI_STATUS   status;

    if (pMainSec == NULL)
    {
        return TI_NOK;
    }

    status = mainKeys_unload(pMainSec->pMainKeys);

    status = fsm_Unload(pMainSec->hOs, pMainSec->pMainSecSm);

    status = externalSec_Destroy (pMainSec->pExternalSec);

    os_memoryFree(pMainSec->hOs, pMainSec, sizeof(mainSec_t));

    return TI_OK;
}
开发者ID:bluewater-cn,项目名称:ti_wilink,代码行数:37,代码来源:mainSecSm.c

示例5: connInfra_ScrWaitDisconn_to_disconnect

static TI_STATUS connInfra_ScrWaitDisconn_to_disconnect(void *pData)
{
    TI_STATUS status;
    paramInfo_t *pParam;
    conn_t *pConn = (conn_t *)pData;
    
    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
    if (status != TI_OK)
        return status;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
    pParam->content.rxDataPortStatus = CLOSE;
    status = rxData_setParam(pConn->hRxData, pParam);
    if (status == TI_OK) 
    {
        /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */
        txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_MGMT);

        pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
        regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);

        status = mlme_stop( pConn->hMlme, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP );
        if (status == TI_OK) 
        {
            /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
                supported rates, and stopModules clears all rates. */
            stopModules(pConn, TI_TRUE);
    
            /* send disconnect command to firmware */
            prepare_send_disconnect(pData);
        }
    }

    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
    return status;
}
开发者ID:chambejp,项目名称:hardware,代码行数:42,代码来源:connInfra.c

示例6: externalSec_Destroy

/**
*
* Function  - externalSec_Destroy.
*
* \b Description:
*
* Called by mainSecSM (mainSec_unload).
*
* \b ARGS:
*
*
* \b RETURNS:
*
*  TI_STATUS - 0 on success, any other value on failure.
*
*/
TI_STATUS externalSec_Destroy(struct externalSec_t * pExternalSec)
{
	TI_STATUS status;

	if (pExternalSec == NULL) {
		return TI_NOK;
	}

	status = fsm_Unload(pExternalSec->hOs, pExternalSec->pExternalSecSm);
	if (status != TI_OK) {
		/* report failure but don't stop... */
		TRACE0(pExternalSec->hReport, REPORT_SEVERITY_ERROR,
		       "EXTERNAL SECURITY: Error releasing FSM memory \n");
	}

	os_memoryFree(pExternalSec->hOs, pExternalSec,
		      sizeof(struct externalSec_t));

	return TI_OK;
}
开发者ID:blueskycoco,项目名称:wang-linux,代码行数:36,代码来源:externalSec.c

示例7: RxQueue_Destroy

/**
 * \fn     RxQueue_Destroy()
 * \brief  Destroy the module.
 *
 * Free the module's queues and object.
 *
 * \param  hRxQueue - The module object
 * \return TI_OK on success or TI_NOK on failure
 * \sa     RxQueue_Create
 */
TI_STATUS RxQueue_Destroy (TI_HANDLE hRxQueue)
{
	TRxQueue *pRxQueue;

	if (hRxQueue) {
		pRxQueue = (TRxQueue *)hRxQueue;

		if (pRxQueue->hMissingPktTimer) {
			tmr_DestroyTimer (pRxQueue->hMissingPktTimer);
			pRxQueue->hMissingPktTimer = NULL;
		}

		/* free module object */
		os_memoryFree (pRxQueue->hOs, pRxQueue, sizeof(TRxQueue));

		return TI_OK;
	}

	return TI_NOK;
}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:30,代码来源:RxQueue.c

示例8: MacServices_destroy

/****************************************************************************************
 *                        MacServices_destroy                                                    *
 *****************************************************************************************
DESCRIPTION: destroys MacServices module
                                                                                                                               
INPUT:          hMacServices - handle to the Mac Services object.
OUTPUT:     
RETURN:     
****************************************************************************************/
void MacServices_destroy( TI_HANDLE hMacServices ) 
{
    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
    
    /* destroy all SRV modules */
    if ( NULL != pMacServices->hScanSRV )
    {
        MacServices_scanSRV_destroy( pMacServices->hScanSRV );
    }
    if ( NULL != pMacServices->hMeasurementSRV )
    {
        MacServices_measurementSRV_destroy( pMacServices->hMeasurementSRV );
    }

    if(pMacServices->hPowerSrv)
    powerSrv_destroy(pMacServices->hPowerSrv);

    /* free the Mac services allocated context */
    os_memoryFree( pMacServices->hOS, (TI_HANDLE)pMacServices , sizeof(MacServices_t) );
}
开发者ID:bluewater-cn,项目名称:ti_wilink,代码行数:29,代码来源:MacServices.c

示例9: mem_Free

/****************************************************************************************
 *                        os_memoryFree()
 ****************************************************************************************
DESCRIPTION:    This function releases a block of memory previously allocated with the
                os_memoryAlloc function.


ARGUMENTS:      OsContext   -   our adapter context.
                pMemPtr     -   Pointer to the base virtual address of the allocated memory.
                                This address was returned by the os_memoryAlloc function.
                Size        -   Specifies the size, in bytes, of the memory block to be released.
                                This parameter must be identical to the Length that was passed to
                                os_memoryAlloc.

RETURN:         None

NOTES:
*****************************************************************************************/
void mem_Free (TI_HANDLE hMem, void* ptr, TI_UINT32 size)
{
	TMemMng *pMemMng = (TMemMng *)hMem;
	TMemBlock *pMemBlock = (TMemBlock *)((TI_UINT8 *)ptr - sizeof(TMemBlock));


	if (pMemBlock->signature == MEM_BLOCK_START) {
		*(TI_UINT8 *)(&pMemBlock->signature) = '~';
		if (*(TI_UINT32 *)((TI_UINT8 *)pMemBlock + pMemBlock->size + sizeof(TMemBlock)) != MEM_BLOCK_END) {
		}

		os_memoryFree (pMemMng->hOs, pMemBlock, pMemBlock->signature + sizeof(TMemBlock) + sizeof(TI_UINT32));

		pMemMng->uCurAllocated -= size + sizeof(TMemBlock) + sizeof(TI_UINT32);

		if ((int)pMemMng->uCurAllocated < 0) {
			pMemMng->uCurAllocated = 0;
		}
	}
}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:38,代码来源:mem.c

示例10: twIf_Destroy

/** 
 * \fn     twIf_Destroy
 * \brief  Destroy the module. 
 * 
 * Unregister from TxnQ and free the TxnDone-queue and the module's object.
 * 
 * \note   
 * \param  The module's object
 * \return TI_OK on success or TI_NOK on failure 
 * \sa     twIf_Create
 */ 
TI_STATUS twIf_Destroy (TI_HANDLE hTwIf)
{
    TTwIfObj *pTwIf = (TTwIfObj*)hTwIf;

    if (pTwIf)
    {
        txnQ_Close (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN);
        if (pTwIf->hTxnDoneQueue)
        {
            que_Destroy (pTwIf->hTxnDoneQueue);
        }
        if (pTwIf->hPendRestartTimer)
        {
            tmr_DestroyTimer (pTwIf->hPendRestartTimer);
        }
        os_memoryFree (pTwIf->hOs, pTwIf, sizeof(TTwIfObj));     
    }

    return TI_OK;
}
开发者ID:bluewater-cn,项目名称:ti_wilink,代码行数:31,代码来源:TwIf.c

示例11: measurementMgr_releaseModule

/**
 * Releases the module's allocated objects according to the given init vector.
 * 
 * @param pMeasurementMgr A handle to the Measurement Manager module.
 * @param initVec The init vector with a bit set for each allocated object.
 * 
 * @date 01-Jan-2006
 */
static void measurementMgr_releaseModule (measurementMgr_t * pMeasurementMgr)
{

    if (pMeasurementMgr->hActivationDelayTimer)
    {
        tmr_DestroyTimer (pMeasurementMgr->hActivationDelayTimer);
    }


    if (pMeasurementMgr->pMeasurementMgrSm)
    {
        fsm_Unload(pMeasurementMgr->hOs, pMeasurementMgr->pMeasurementMgrSm);
    }

    if (pMeasurementMgr->hRequestH)
    {
        requestHandler_destroy(pMeasurementMgr->hRequestH);
    }
    
    os_memoryFree(pMeasurementMgr->hOs, pMeasurementMgr, sizeof(measurementMgr_t));
}
开发者ID:chambejp,项目名称:hardware,代码行数:29,代码来源:measurementMgr.c

示例12: assoc_unload

/**
*
* assocunload - unload association SM from memory
*
* \b Description: 
*
* Unload association SM from memory
*
* \b ARGS:
*
*  I   - hAssoc - association SM context  \n
*
* \b RETURNS:
*
*  OK if successful, NOK otherwise.
*
* \sa rsn_mainSecSmKeysOnlyStop()
*/
TI_STATUS assoc_unload(TI_HANDLE hAssoc)
{
    TI_STATUS 		status;
	assoc_t		*pHandle;

	pHandle = (assoc_t*)hAssoc;

	status = fsm_Unload(pHandle->hOs, pHandle->pAssocSm);
    if (status != OK)
	{
		/* report failure but don't stop... */
		WLAN_REPORT_ERROR(pHandle->hReport, ASSOC_MODULE_LOG,
				  ("ASSOC_SM: Error releasing FSM memory \n"));
	}
	
	os_timerDestroy(pHandle->hOs, pHandle->timer);
	
	os_memoryFree(pHandle->hOs, hAssoc, sizeof(assoc_t));

	return OK;
}
开发者ID:Katarzynasrom,项目名称:patch-hosting-for-android-x86-support,代码行数:39,代码来源:assocSM.c

示例13: txDataQ_Destroy

/** 
 * \fn     txDataQ_Destroy
 * \brief  Destroy the module and its queues
 * 
 * Clear and destroy the queues and then destroy the module object.
 * 
 * \note   
 * \param  hTxDataQ - The object                                          
 * \return TI_OK - Unload succesfull, TI_NOK - Unload unsuccesfull 
 * \sa     
 */ 
TI_STATUS txDataQ_Destroy (TI_HANDLE hTxDataQ)
{
    TTxDataQ  *pTxDataQ = (TTxDataQ *)hTxDataQ;
    TI_STATUS  status = TI_OK;
    TI_UINT32  uQueId;
    TDataLinkQ *pLinkQ;
    TI_UINT32  uHlid;

    /* Dequeue and free all queued packets */
    txDataQ_ClearQueues (hTxDataQ);

    /* 
     * init all queues in all links 
     */
    for (uHlid = 0; uHlid < WLANLINKS_MAX_LINKS; uHlid++)
    {
        pLinkQ = &pTxDataQ->aDataLinkQ[uHlid]; /* Link queues */

        /* Free Data queues */
        for (uQueId = 0 ; uQueId < pTxDataQ->uNumQueues ; uQueId++)
        {
            if (que_Destroy(pLinkQ->aQueues[uQueId]) != TI_OK)
            {
                TRACE1(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "txDataQueue_unLoad: fail to free Data Queue number: %d\n",uQueId);
    			status = TI_NOK;
            }
        }
    }

    /* free timer */
    if (pTxDataQ->hTxSendPaceTimer)
    {
        tmr_DestroyTimer (pTxDataQ->hTxSendPaceTimer);
    }

    /* Free Tx Data Queue Module */
    os_memoryFree (pTxDataQ->hOs, pTxDataQ, sizeof(TTxDataQ));

    return status;
}
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:51,代码来源:txDataQueue.c

示例14: broadcastKey_unload

TI_STATUS broadcastKey_unload(struct _broadcastKey_t *pBroadcastKey)
{
	TI_STATUS		status;

	status = keyDerive_unload(pBroadcastKey->pKeyDerive);

	if (status != TI_OK) {
		TRACE0(pBroadcastKey->hReport, REPORT_SEVERITY_CONSOLE, "BCAST_KEY_SM: Error in unloading key derivation module\n");
		WLAN_OS_REPORT(("BCAST_KEY_SM: Error in unloading key derivation module\n"));
	}

	status = fsm_Unload(pBroadcastKey->hOs, pBroadcastKey->pBcastKeySm);
	if (status != TI_OK) {
		TRACE0(pBroadcastKey->hReport, REPORT_SEVERITY_CONSOLE, "BCAST_KEY_SM: Error in unloading state machine\n");
		WLAN_OS_REPORT(("BCAST_KEY_SM: Error in unloading state machine\n"));
	}

	/* free key parser context memory */
	os_memoryFree(pBroadcastKey->hOs, pBroadcastKey, sizeof(broadcastKey_t));

	return TI_OK;
}
开发者ID:3ig,项目名称:Xperia-2011-Official-Kernel-Sources,代码行数:22,代码来源:broadcastKeySM.c

示例15: tmr_DestroyTimer

/** 
 * \fn     tmr_DestroyTimer
 * \brief  Destroy the specified timer
 * 
 * Destroy the specified timer object, icluding the timer in the OS-API.  
 * 
 * \note   This timer destruction function should be used before tmr_Destroy() is executed!!
 * \param  hTimerInfo - The timer handle
 * \return TI_OK on success or TI_NOK on failure 
 * \sa     tmr_CreateTimer
 */ 
TI_STATUS tmr_DestroyTimer (TI_HANDLE hTimerInfo)
{
    TTimerInfo   *pTimerInfo   = (TTimerInfo *)hTimerInfo;                 /* The timer handle */     
    TTimerModule *pTimerModule;                  /* The timer module handle */
    if (!pTimerInfo)
    {
        return TI_NOK;
    }
    pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule;
    if (!pTimerModule)
    {
        WLAN_OS_REPORT (("tmr_DestroyTimer(): ERROR - NULL timer!\n"));
        return TI_NOK;
    }

    /* Free the OS-API timer */
    if ((pTimerInfo->hOsTimerObj) &&  (pTimerModule->hOs))
    {
    	os_timerDestroy (pTimerModule->hOs, pTimerInfo->hOsTimerObj);
    	if (pTimerModule->uTimersCount>0)
    	{
			pTimerModule->uTimersCount--;  /* update created timers number */
    	}
    	else
    	{
    		WLAN_OS_REPORT (("tmr_DestroyTimer(): ERROR - timers count < 0!\n"));
    	}
    }
    else
    {
    	WLAN_OS_REPORT (("tmr_DestroyTimer(): ERROR - NULL pointers!\n"));
    }
    /* Free the timer object */
    os_memoryFree (pTimerModule->hOs, hTimerInfo, sizeof(TTimerInfo));
	

    return TI_OK;
}
开发者ID:nadlabak,项目名称:tiwlan,代码行数:49,代码来源:timer.c


注:本文中的os_memoryFree函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。