Allocate memory or panic */
| 116 | |
| 117 | /* Allocate memory or panic */ |
| 118 | void *zmalloc(size_t size) { |
| 119 | void *ptr = ztrymalloc_usable(size, NULL); |
| 120 | if (!ptr) zmalloc_oom_handler(size); |
| 121 | return ptr; |
| 122 | } |
| 123 | |
| 124 | /* Try allocating memory, and return NULL if failed. */ |
| 125 | void *ztrymalloc(size_t size) { |
no test coverage detected