molloc
函数原型:void *malloc(size_t size)
优点:简单,方便,兼容性好
缺点:速度慢
dma_buf_alloc
函数原型: int dma_buf_alloc(const char *path, size_t size, int *fd, void **va)
优点:内存共享,共享节点在/dev/dma_heap/* 速度快
缺点:只能申请4G以下的内存
drm_buf_alloc
函数原型:void *drm_buf_alloc(int TexWidth, int TexHeight, int bpp, int *fd, int *handle, size_t *actual_size, int flags=0)
优点:内存共享,速度快
缺点:需要额外安装libdrm库
119 Bytes, 下载次数: 1, 下载积分: 灯泡 -1 , 经验 -1
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) | Powered by Discuz! X3.1 |