xos_heaps.h.svn-base

来自「brew头文件分析」· SVN-BASE 代码 · 共 87 行

SVN-BASE
87
字号
//**************************************************************
//Copyright (C), 2008-2008, AnyLook Co., Ltd.
//File name:    xOS_Heaps.h
//Author:       AnyLook
//Version:      1.0
//Date:        2008/07/31
//Description:
//    xOS Include file
//Others: 
//Function List: 
//<Name>        <desc>
//Simple        
//History: 
//<author>      <time>      <version >  <desc>
// AnyLook		 2008/07/31       1.0       build this moudle  
//**************************************************************


#ifndef _xOS_Heaps_H
#define _xOS_Heaps_H


#ifdef __cplusplus
extern "C" {
#endif

#include "xOS_Heaps_VTBL.h"

static INLINE void *xOS_Heaps_Malloc(uint32 dwSize)
{
	if (GETHEAPS(g_pxOSList))
	{
		return	GETHEAPS(g_pxOSList)->Malloc(dwSize);
	}
	return 0;		
}


static INLINE void *xOS_Heaps_Realloc(void *pMem, uint32 dwSize)
{
	if (GETHEAPS(g_pxOSList))
	{
		return	GETHEAPS(g_pxOSList)->Realloc(pMem, dwSize);
	}
	return 0;		
}

static INLINE void *xOS_Heaps_Calloc(uint32 dwMemb, uint32 dwSize)
{
	if (GETHEAPS(g_pxOSList))
	{
		return	GETHEAPS(g_pxOSList)->Calloc(dwMemb, dwSize);
	}
	return 0;		
}


static INLINE void xOS_Heaps_Free(void *pMem)
{
	if (GETHEAPS(g_pxOSList))
	{
		GETHEAPS(g_pxOSList)->Free(pMem);
	}
		
}


static INLINE uint32 xOS_Heaps_FreeSpace(uint32 *pTotal)
{
	if (GETHEAPS(g_pxOSList))
	{
		return	GETHEAPS(g_pxOSList)->FreeSpace(pTotal);
	}
	return 0;		
}





#ifdef __cplusplus
}
#endif

#endif //_xOS_Heaps_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?