📄 cimagememmgr.h
字号:
/********************** BEGIN LICENSE BLOCK ************************************
*
* JZ4740 mobile_tv Project V1.0.0
* INGENIC CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM
* Copyright (c) Ingenic Semiconductor Co. Ltd 2005. All rights reserved.
*
* This file, and the files included with this file, is distributed and made
* available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
*
* http://www.ingenic.cn
*
********************** END LICENSE BLOCK **************************************
*
* Author: <dsqiu@ingenic.cn> <hlyu@ingenic.cn>
*
* Create: 2008-03-04, by dsqiu
* Maintain: 2008-06-23, by hlyu
*
*******************************************************************************
*/
#ifndef __CIMAGE_MEM_
#define __CIMAGE_MEM_
#include "uclib.h"
void * operator new[](unsigned int size);
void operator delete[](void *p);
#if JZ4740_PMP16
void * operator new(unsigned int size);
void operator delete(void *p);
#endif
class CImageMemMgr
{
public:
void * operator new(unsigned int size)
{
//printf("image new...\n");
return (void *)Module_Alloc(size);
}
void operator delete(void *p)
{
GM_Dealloc(p);
}
static void *malloc(unsigned int size)
{
return (void *)Module_Alloc(size);
}
static void free(void * mem)
{
GM_Dealloc(mem);
}
static void* calloc(int size, unsigned int n)
{
return (void *)Module_CAlloc(size,n) ;
}
static void* realloc(void *mem,unsigned int size)
{
return (void *)Module_Realloc(mem,size);
}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -