Lines Matching refs:ensure
96 _lwsac_use(struct lwsac **head, size_t ensure, size_t chunk_size, char backfill) in _lwsac_use() argument
105 al = lwsac_align(ensure); in _lwsac_use()
114 if (bf->alloc_size - bf->ofs >= ensure) in _lwsac_use()
125 if (bf->alloc_size - bf->ofs >= ensure) in _lwsac_use()
149 lwsl_debug("%s: alloc %d for %d\n", __func__, (int)alloc, (int)ensure); in _lwsac_use()
190 if (al > ensure) in _lwsac_use()
192 memset((char *)bf + ofs + ensure, 0, al - ensure); in _lwsac_use()
202 lwsac_use(struct lwsac **head, size_t ensure, size_t chunk_size) in lwsac_use() argument
204 return _lwsac_use(head, ensure, chunk_size, 0); in lwsac_use()
208 lwsac_use_backfill(struct lwsac **head, size_t ensure, size_t chunk_size) in lwsac_use_backfill() argument
210 return _lwsac_use(head, ensure, chunk_size, 1); in lwsac_use_backfill()
251 lwsac_use_zero(struct lwsac **head, size_t ensure, size_t chunk_size) in lwsac_use_zero() argument
253 void *p = lwsac_use(head, ensure, chunk_size); in lwsac_use_zero()
256 memset(p, 0, ensure); in lwsac_use_zero()