osmodule_memorymanagement.c

来自「Nand Flash Translation Layer 用于nandflas」· C语言 代码 · 共 87 行

C
87
字号
//#define SYMBIAN
//#define LINUX
//#define STAND_ALONE
#define NUCLUES

#include "drivermmiif.h"
#include "driverosif.h"
#include "OSModule_MemoryManagement.h"


/*
void * OS_Malloc(int size)
{
#ifdef SYMBIAN
#endif

#ifdef NUCLUES
	return(OS_DRIVER_Malloc(size)) ;
#endif

#ifdef STAND_ALONE
	return malloc(size);
#endif
}

void OS_Free(void *pointer)
{
	if (pointer == NULL)
	{
		return;
	}
#ifdef SYMBIAN
#endif

#ifdef NUCLUES
	OS_DRIVER_Free(pointer);
#endif

#ifdef STAND_ALONE
	free(pointer);
#endif		
}
*/

void OS_MemCopy(void *destination, void *source, int size)
{
#ifdef SYMBIAN
#endif

#ifdef NUCLUES
	memcpy(destination,source,size);
#endif

#ifdef STAND_ALONE
	memcpy(destination,source,size);
#endif
}

void OS_MemSet(void *destination, unsigned char value, int size)
{
#ifdef SYMBIAN
#endif

#ifdef NUCLUES
	memset(destination,value,size);
#endif

#ifdef STAND_ALONE
	memset(destination,value,size);
#endif
}

char * OS_SearchString(void *string, void *searchString)
{
#ifdef SYMBIAN
#endif

#ifdef NUCLUES
	return strstr(string,searchString);
#endif

#ifdef STAND_ALONE
	return strstr(string,searchString);
#endif
}

⌨️ 快捷键说明

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