Wrap malloc to abort on failure so OOM checks don't make the test logic * harder to follow. */
| 1086 | /* Wrap malloc to abort on failure so OOM checks don't make the test logic |
| 1087 | * harder to follow. */ |
| 1088 | void *hi_malloc_safe(size_t size) { |
| 1089 | void *ptr = hi_malloc(size); |
| 1090 | if (ptr == NULL) { |
| 1091 | fprintf(stderr, "Error: Out of memory\n"); |
| 1092 | exit(-1); |
| 1093 | } |
| 1094 | |
| 1095 | return ptr; |
| 1096 | } |
| 1097 | |
| 1098 | static void test_throughput(struct config config) { |
| 1099 | redisContext *c = do_connect(config); |
no test coverage detected