*参照元 [#qa94e060] #backlinks *説明 [#za6344aa] -パス: [[linux-4.4.1/drivers/staging/android/ion/ion_priv.h]] -FIXME: これは何? --説明 --ION は ION ヒープから ION バッファを確保する --ヒープの作成: [[linux-4.4.1/ion_heap_create()]] --ヒープの破棄: [[linux-4.4.1/ion_heap_destroy()]] **参考 [#ve604c82] *実装 [#jf8505ab] /** * struct ion_heap - represents a heap in the system * @node: rb node to put the heap on the device's tree of heaps * @dev: back pointer to the ion_device * @type: type of heap * @ops: ops struct as above * @flags: flags * @id: id of heap, also indicates priority of this heap when * allocating. These are specified by platform data and * MUST be unique * @name: used for debugging * @shrinker: a shrinker for the heap * @free_list: free list head if deferred free is used * @free_list_size size of the deferred free list in bytes * @lock: protects the free list * @waitqueue: queue to wait on from deferred free thread * @task: task struct of deferred free thread * @debug_show: called when heap debug file is read to add any * heap specific debug info to output * * Represents a pool of memory from which buffers can be made. In some * systems the only heap is regular system memory allocated via vmalloc. * On others, some blocks might require large physically contiguous buffers * that are allocated from a specially reserved heap. */ struct ion_heap { struct plist_node node; - --[[linux-4.4.1/plist_node]] struct ion_device *dev; - --[[linux-4.4.1/ion_device]] enum ion_heap_type type; - --[[linux-4.4.1/ion_heap_type]] struct ion_heap_ops *ops; - --[[linux-4.4.1/ion_heap_ops]] unsigned long flags; unsigned int id; const char *name; struct shrinker shrinker; - --[[linux-4.4.1/shrinker]] struct list_head free_list; size_t free_list_size; - --[[linux-4.4.1/list_head]] spinlock_t free_lock; wait_queue_head_t waitqueue; struct task_struct *task; - --[[linux-4.4.1/spinlock_t]] --[[linux-4.4.1/wait_queue_head_t]] --[[linux-4.4.1/task_struct]] int (*debug_show)(struct ion_heap *heap, struct seq_file *, void *); - --[[linux-4.4.1/seq_file]] }; *コメント [#q1544472]