ION is the memory manager of Android, it could be used by graphic and multimedia stacks to allocate buffers.
ION include a buffer sharing mechanism between process and drivers.
ION define opaque handles to manage underline buffers.
ION handles are only map in kernel if that is needed by drivers, it help to save logical address space.
In a same way ION handles aren't mmaped by default in userland but all helpers functions are provided.
ION files
In an Android kernel you can found ION files here:
- include/linux/ion.h
- drivers/gpu/ion/*
ION architecture
ION define different type of heaps:
- ION_HEAP_TYPE_SYSTEM : memory allocated via vmalloc
- ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc
- ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved carveout heap, allocations are physically contiguous
- ION_HEAP_TYPE_CHUNK
- ION_HEAP_TYPE_DMA: memory allocated via DMA API
(....go see the rest in his site)
沒有留言:
張貼留言