Lines Matching refs:ptr
89 * with ptr.
91 #define declare_initialize_value_pointer_pointer(name, ptr) \
94 name.x.pointer = (void*)(ptr)
1508 static void libc_free(void *ptr)
1511 free(ptr);
1515 static void *libc_realloc(void *ptr, size_t size)
1518 return realloc(ptr, size);
1579 char* ptr;
1588 ptr = (char*)(((size_t)block + MALLOC_GUARD_SIZE + sizeof(*block_info) +
1592 memset(ptr - MALLOC_GUARD_SIZE, MALLOC_GUARD_PATTERN, MALLOC_GUARD_SIZE);
1593 memset(ptr + size, MALLOC_GUARD_PATTERN, MALLOC_GUARD_SIZE);
1594 memset(ptr, MALLOC_ALLOC_PATTERN, size);
1596 block_info = (MallocBlockInfo*)(ptr - (MALLOC_GUARD_SIZE +
1604 return ptr;
1611 void* const ptr = _test_malloc(number_of_elements * size, file, line);
1612 if (ptr) {
1613 memset(ptr, 0, number_of_elements * size);
1615 return ptr;
1621 void _test_free(void* const ptr, const char* file, const int line) {
1623 char *block = discard_const_p(char, ptr);
1626 if (ptr == NULL) {
1630 _assert_true(cast_ptr_to_largest_integral_type(ptr), "ptr", file, line);
1647 ptr, (unsigned long)block_info->size,
1664 void *_test_realloc(void *ptr,
1670 char *block = ptr;
1674 if (ptr == NULL) {
1679 _test_free(ptr, file, line);
1695 memcpy(new, ptr, block_size);
1698 _test_free(ptr, file, line);