Lines Matching refs:mem
7 static bool mem_has_bytes(const void *mem, size_t size, uint8_t b)
9 const uint8_t *bytes = mem;
28 void *mem = NULL;
36 if (mem != NULL) {
37 test_assert_idx(mem_has_bytes(mem, last_alloc, SENSE), i);
42 p_free(pool, mem);
45 if (mem != NULL)
49 mem = p_realloc(pool, mem, last_alloc, i*2);
51 test_assert_idx(mem_has_bytes(mem, last_alloc, SENSE), i);
52 memset(mem, SENSE, i*2);
57 if (mem != NULL)
61 mem = p_realloc(pool, mem, last_alloc, i-2);
63 test_assert_idx(mem_has_bytes(mem, i-2, SENSE), i);
64 memset(mem, SENSE, i-2);
69 mem = p_malloc(pool, i);
71 memset(mem, SENSE, i);
84 mem = NULL;
87 mem = p_realloc(pool, mem, i-1, i);
88 test_assert_idx(mem_has_bytes(mem, i-1, 0xde), i);
89 memset(mem, 0xde, i);