| 693 | #ifdef REDIS_TEST |
| 694 | #define UNUSED(x) ((void)(x)) |
| 695 | int zmalloc_test(int argc, char **argv, int accurate) { |
| 696 | void *ptr; |
| 697 | |
| 698 | UNUSED(argc); |
| 699 | UNUSED(argv); |
| 700 | UNUSED(accurate); |
| 701 | printf("Malloc prefix size: %d\n", (int) PREFIX_SIZE); |
| 702 | printf("Initial used memory: %zu\n", zmalloc_used_memory()); |
| 703 | ptr = zmalloc(123); |
| 704 | printf("Allocated 123 bytes; used: %zu\n", zmalloc_used_memory()); |
| 705 | ptr = zrealloc(ptr, 456); |
| 706 | printf("Reallocated to 456 bytes; used: %zu\n", zmalloc_used_memory()); |
| 707 | zfree(ptr); |
| 708 | printf("Freed pointer; used: %zu\n", zmalloc_used_memory()); |
| 709 | return 0; |
| 710 | } |
| 711 | #endif |
nothing calls this directly
no test coverage detected