Lines Matching refs:base
72 void *base = 0; in alloc_buffer() local
103 base = mmap(0, ionAllocData.len, PROT_READ|PROT_WRITE, in alloc_buffer()
105 if(base == MAP_FAILED) { in alloc_buffer()
112 memset(base, 0, ionAllocData.len); in alloc_buffer()
114 clean_buffer(base, data.size, data.offset, fd_data.fd, in alloc_buffer()
118 data.base = base; in alloc_buffer()
122 data.base, ionAllocData.len, data.fd); in alloc_buffer()
127 int IonAlloc::free_buffer(void* base, size_t size, int offset, int fd) in free_buffer() argument
131 base, size, fd); in free_buffer()
137 if(base) in free_buffer()
138 err = unmap_buffer(base, size, offset); in free_buffer()
146 void *base = 0; in map_buffer() local
153 base = mmap(0, size, PROT_READ| PROT_WRITE, in map_buffer()
155 *pBase = base; in map_buffer()
156 if(base == MAP_FAILED) { in map_buffer()
162 base, size, offset, fd); in map_buffer()
167 int IonAlloc::unmap_buffer(void *base, size_t size, int offset) in unmap_buffer() argument
169 ALOGD_IF(DEBUG, "ion: Unmapping buffer base:%p size:%d", base, size); in unmap_buffer()
171 if(munmap(base, size)) { in unmap_buffer()
174 base, strerror(errno)); in unmap_buffer()
179 int IonAlloc::clean_buffer(void *base, size_t size, int offset, int fd, int op) in clean_buffer() argument
201 flush_data.vaddr = base; in clean_buffer()