|
开始用了许多是内存分配函,都分配错误
如:
#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()
问题解决了 |
|