Lines Matching refs:ptr
23 void *ptr; in alloc_simple() local
34 ptr = map_sysmem(addr, bytes); in alloc_simple()
37 return ptr; in alloc_simple()
42 void *ptr; in malloc_simple() local
44 ptr = alloc_simple(bytes, 1); in malloc_simple()
45 if (!ptr) in malloc_simple()
46 return ptr; in malloc_simple()
48 log_debug("%lx\n", (ulong)ptr); in malloc_simple()
49 VALGRIND_MALLOCLIKE_BLOCK(ptr, bytes, 0, false); in malloc_simple()
51 return ptr; in malloc_simple()
56 void *ptr; in memalign_simple() local
58 ptr = alloc_simple(bytes, align); in memalign_simple()
59 if (!ptr) in memalign_simple()
60 return ptr; in memalign_simple()
61 log_debug("aligned to %lx\n", (ulong)ptr); in memalign_simple()
62 VALGRIND_MALLOCLIKE_BLOCK(ptr, bytes, 0, false); in memalign_simple()
64 return ptr; in memalign_simple()
71 void *ptr; in calloc() local
73 ptr = malloc(size); in calloc()
74 if (!ptr) in calloc()
75 return ptr; in calloc()
76 memset(ptr, '\0', size); in calloc()
78 return ptr; in calloc()
82 void free_simple(void *ptr) in free_simple() argument
84 VALGRIND_FREELIKE_BLOCK(ptr, 0); in free_simple()