* The linear pool consists of a list of memory chunks of size at least
* @blk.
*/
-linpool
-*lp_new(pool *p, uint blk)
+linpool * NONNULL(1)
+lp_new(pool *p, uint blk)
{
linpool *m = ralloc(p, &lp_class);
m->chunk_size = blk;
* chunk, not to the resource, hence you have to free it using
* mb_free(), not rfree().
*/
-void *
+void * NONNULL(1)
mb_alloc(pool *p, unsigned size)
{
struct mblock *b = xmalloc(sizeof(struct mblock) + size);
* chunk, not to the resource, hence you have to free it using
* mb_free(), not rfree().
*/
-void *
+void * NONNULL(1)
mb_allocz(pool *p, unsigned size)
{
void *x = mb_alloc(p, size);
/* Normal memory blocks */
-void *mb_alloc(pool *, unsigned size);
-void *mb_allocz(pool *, unsigned size);
+void *mb_alloc(pool *, unsigned size) NONNULL(1);
+void *mb_allocz(pool *, unsigned size) NONNULL(1);
void *mb_realloc(void *m, unsigned size);
void mb_free(void *);
byte *ptr;
} lp_state;
-linpool *lp_new(pool *, unsigned blk);
+linpool *lp_new(pool *, unsigned blk) NONNULL(1);
void *lp_alloc(linpool *, unsigned size); /* Aligned */
void *lp_allocu(linpool *, unsigned size); /* Unaligned */
void *lp_allocz(linpool *, unsigned size); /* With clear */