ammem.c
来自「JPEG解压软件,包含PC端的测试程序,程序结构比较清晰」· C语言 代码 · 共 56 行
C
56 行
/*
* AMMem.c
*
* the implementations of memory operations on wince platform
*
*/
#include "AMPlat.h"
#include "AMMem.h"
MPVoid AMMemAlloc(MHandle hContext, MLong size)
{
return (MPVoid)malloc(size);
}
MVoid AMMemFree(MHandle hContext, MPVoid pMem)
{
free(pMem);
}
MHandle AMHugeMemAlloc(MHandle hContext, MLong size)
{
return (MHandle)malloc(size);
}
MVoid AMHugeMemFree(MHandle hContext, MHandle hMem)
{
free( (MPVoid)hMem );
}
MPVoid AMHugeMemLock(MHandle hContext, MHandle hMem)
{
return (MPVoid)hMem;
}
MVoid AMHugeMemUnlock(MHandle hContext, MHandle hMem)
{
}
MVoid AMMemSet(MPVoid mem, MByte val, MLong size)
{
memset( mem, val, size );
}
MVoid AMMemCpy(MPVoid dst, const MPVoid src, MLong size)
{
memcpy(dst, src, size);
}
MVoid AMMemMove(MPVoid dst, const MPVoid src, MLong size)
{
memmove(dst, src, size);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?