找回密码
 注册
搜索
查看: 1073|回复: 0

[资料] MTK 11A 内存问题处理

[复制链接]
发表于 2012-2-13 15:40:35 | 显示全部楼层 |阅读模式
开始用了许多是内存分配函,都分配错误
如:
#define OslMalloc(nob)  malloc(nob)
#define OslMfree(frp)   free(frp)



#define med_alloc_ext_mem(size)                 med_alloc_ext_mem_ext(size,MED_EXT_MEMORY_TYPE_NONCACHEABLE,__FILE__,__LINE__)
#define med_alloc_ext_mem_cacheable(size)       med_alloc_ext_mem_ext(size,MED_EXT_MEMORY_TYPE_CACHEABLE,__FILE__,__LINE__)
#define med_alloc_ext_mem_framebuffer(size)     med_alloc_ext_mem_ext(size,MED_EXT_MEMORY_TYPE_FRAMEBUFFER,__FILE__,__LINE__)
#define med_alloc_ext_mem_topmost_noncacheable(size)         med_alloc_ext_mem_ext(size,MED_EXT_MEMORY_TYPE_TOPPEST_NONCACHEABLE,__FILE__,__LINE__)
#define med_alloc_ext_mem_topmost_cacheable(size) med_alloc_ext_mem_ext(size,MED_EXT_MEMORY_TYPE_TOPPEST_CACHEABLE,__FILE__,__LINE__)
#define med_free_ext_mem(pointer)               med_free_ext_mem_ext(pointer,__FILE__,__LINE__)
#define med_alloc_aud_mem(size)                 med_alloc_ext_mem_ext(size,MED_EXT_MEMORY_TYPE_AUDIO_NONCACHEABLE,__FILE__,__LINE__)
#define med_alloc_aud_mem_cacheable(size)       med_alloc_ext_mem_ext(size,MED_EXT_MEMORY_TYPE_AUDIO_CACHEABLE,__FILE__,__LINE__)
#define med_free_aud_mem(pointer)               med_free_aud_mem_ext(pointer,__FILE__,__LINE__)



好像是只能分配2K大小的内存。大于2K会出错的。
所以最后调用了:

#define applib_asm_alloc_anonymous(_size)      mmi_frm_asm_alloc_anonymous_int(_size, KAL_FALSE, __FILE__, __LINE__)
#define applib_asm_alloc_anonymous_nc(_size)      mmi_frm_asm_alloc_anonymous_int(_size, KAL_TRUE, __FILE__, __LINE__)
#define applib_asm_free_anonymous(_mem_ptr)    mmi_frm_asm_free_anonymous_int(_mem_ptr, __FILE__, __LINE__)
#define applib_asm_get_max_alloc_anonymous()    mmi_frm_asm_get_max_alloc_anonymous()



问题解决了
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2025-1-28 10:22 , Processed in 0.044021 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表