Index memory. A failed allocation is remembered: whatever a caller does * with its NULL, the build as a whole reports failure instead of handing out * an index that silently lacks a declaration. */
| 623 | * with its NULL, the build as a whole reports failure instead of handing out |
| 624 | * an index that silently lacks a declaration. */ |
| 625 | static void *ix_alloc(cs_index_t *ix, size_t n) { |
| 626 | void *p = cbm_arena_alloc(&ix->arena, n ? n : SKIP_ONE); |
| 627 | ix->oom = ix->oom || !p; |
| 628 | return p; |
| 629 | } |
| 630 | |
| 631 | static void *ix_zalloc(cs_index_t *ix, size_t n) { |
| 632 | void *p = ix_alloc(ix, n); |
no test coverage detected