Lines Matching refs:ptr
117 void *volatile ptr = strdup ("ptr"); in check_for_allocations() local
122 free (ptr); in check_for_allocations()
130 static struct allocation_header *get_header (const char *op, void *ptr) in get_header() argument
132 struct allocation_header *header = ((struct allocation_header *) ptr) - 1; in get_header()
135 op, ptr, header->allocation_index, allocation_index); in get_header()
138 op, ptr, allocations[header->allocation_index]); in get_header()
190 realloc_internal (void *ptr, size_t new_size) in realloc_internal() argument
192 struct allocation_header *header = get_header ("realloc", ptr); in realloc_internal()
195 return ptr; in realloc_internal()
200 memcpy (newptr, ptr, old_size); in realloc_internal()
234 free (void *ptr) in free() argument
236 if (ptr == NULL) in free()
239 struct allocation_header *header = get_header ("free", ptr); in free()
260 realloc (void *ptr, size_t n) in realloc() argument
264 free (ptr); in realloc()
267 else if (ptr == NULL) in realloc()
272 void *result = realloc_internal (ptr, n); in realloc()