Lines Matching defs:slab
500 * Initializes a single slab.
501 * @param s The slab to initialize.
511 * Adds a string to a slab and returns a pointer to it, or NULL if it could not
513 * @param s The slab to add to.
516 * @return A pointer to the new string in the slab, or NULL if it could not
541 bc_slab_free(void* slab)
543 free(((BcSlab*) slab)->s);
549 BcSlab* slab;
555 // We always want to have at least one slab.
556 slab = bc_vec_pushEmpty(v);
557 bc_slab_init(slab);
565 BcSlab slab;
580 slab.len = SIZE_MAX;
581 slab.s = bc_vm_strdup(str);
583 // Push the standalone slab.
584 bc_vec_pushAt(v, &slab, v->len - 1);
586 return slab.s;
589 // Add to a slab.
593 // If it couldn't be added, add a slab and try again.
617 // Get the first slab.
620 // Either the slab must be valid (not standalone), or there must be
621 // another slab.
632 // If we get here, we know that the first slab is a valid slab. We want to
636 // Empty the first slab.