*参照元 [#e89caa46] #backlinks *説明 [#i2254af1] -パス: [[linux-4.4.1/mm/cma.c]] -FIXME: これは何? --説明 **引数 [#b03b6586] -struct cma *cma -- --[[linux-4.4.1/cma]] -const struct page *pages -- --[[linux-4.4.1/page]] -unsigned int count -- **返り値 [#q5510d43] -bool -- **参考 [#c0896139] *実装 [#ub560857] /** * cma_release() - release allocated pages * @cma: Contiguous memory region for which the allocation is performed. * @pages: Allocated pages. * @count: Number of allocated pages. * * This function releases memory allocated by alloc_cma(). * It returns false when provided pages do not belong to contiguous area and * true otherwise. */ bool cma_release(struct cma *cma, const struct page *pages, unsigned int count) { unsigned long pfn; if (!cma || !pages) return false; pr_debug("%s(page %p)\n", __func__, (void *)pages); - --[[linux-4.4.1/pr_debug()]] pfn = page_to_pfn(pages); - --[[linux-4.4.1/page_to_pfn()]] if (pfn < cma->base_pfn || pfn >= cma->base_pfn + cma->count) return false; VM_BUG_ON(pfn + count > cma->base_pfn + cma->count); - --[[linux-4.4.1/VM_BUG_ON()]] free_contig_range(pfn, count); cma_clear_bitmap(cma, pfn, count); trace_cma_release(pfn, pages, count); - --[[linux-4.4.1/free_contig_range()]] --[[linux-4.4.1/cma_clear_bitmap()]] --[[linux-4.4.1/trace_cma_release()]] return true; } *コメント [#fef56f25]