Lines Matching defs:alloc
228 * FUNCTION : alloc
241 int QCameraMemory::alloc(int count, int size, int heap_id, uint32_t secure_mode)
331 struct ion_allocation_data alloc;
341 memset(&alloc, 0, sizeof(alloc));
342 alloc.len = size;
344 alloc.len = (alloc.len + 4095) & (~4095);
345 alloc.align = 4096;
347 alloc.flags = ION_FLAG_CACHED;
349 alloc.heap_mask = heap_id;
352 alloc.flags = ION_SECURE;
353 alloc.heap_mask = ION_HEAP(ION_CP_MM_HEAP_ID);
354 alloc.align = 1024*1024; //1 MB alignment to be able to protect later
355 alloc.len = (alloc.len + (1024 * 1024 - 1)) & (~(1024 * 1024 -1));
358 rc = ioctl(main_ion_fd, ION_IOC_ALLOC, &alloc);
365 ion_info_fd.handle = alloc.handle;
375 memInfo.size = alloc.len;
380 __func__, (unsigned long)memInfo.handle, alloc.len);
655 rc = alloc(count, size, heap_mask, SECURE);
660 rc = alloc(count, size, heap_mask, NON_SECURE);
703 int rc = alloc(count, size, heap_mask, NON_SECURE);
882 int rc = alloc(count, size, heap_mask, isSecure);
913 int rc = alloc(count, size, heap_mask, NON_SECURE);