Home | History | Annotate | Download | only in src

Lines Matching defs:slab

277  * Add a _SlabKernelBO to the free slab manager.
307 * Get a _SlabKernelBO for us to use as storage for a slab.
449 struct _WsbmSlab *slab;
455 slab = calloc(1, sizeof(*slab));
456 if (!slab)
459 slab->kbo = wsbmAllocKernelBO(header);
460 if (!slab->kbo) {
465 numBuffers = slab->kbo->actualSize / header->bufSize;
471 slab->buffers = calloc(numBuffers, sizeof(*slab->buffers));
472 if (!slab->buffers) {
477 WSBMINITLISTHEAD(&slab->head);
478 WSBMINITLISTHEAD(&slab->freeBuffers);
479 slab->numBuffers = numBuffers;
480 slab->numFree = 0;
481 slab->header = header;
483 sBuf = slab->buffers;
488 sBuf->parent = slab;
490 sBuf->virtual = (void *)((uint8_t *) slab->kbo->virtual +
495 WSBMLISTADDTAIL(&sBuf->head, &slab->freeBuffers);
496 slab->numFree++;
500 WSBMLISTADDTAIL(&slab->head, &header->slabs);
505 sBuf = slab->buffers;
507 if (sBuf->parent == slab) {
513 free(slab->buffers);
515 wsbmSetKernelBOFree(header->slabPool->cache, slab->kbo);
517 free(slab);
522 * Delete a buffer from the slab header delayed list and put
523 * it on the slab free list.
529 struct _WsbmSlab *slab = buf->parent;
530 struct _WsbmSlabSizeHeader *header = slab->header;
534 WSBMLISTADDTAIL(list, &slab->freeBuffers);
535 slab->numFree++;
537 if (slab->head.next == &slab->head)
538 WSBMLISTADDTAIL(&slab->head, &header->slabs);
540 if (slab->numFree == slab->numBuffers) {
541 list = &slab->head;
547 slab->numFree != slab->numBuffers) {
556 slab = WSBMLISTENTRY(list, struct _WsbmSlab, head);
560 sBuf = slab->buffers;
561 for (i = 0; i < slab->numBuffers; ++i) {
562 if (sBuf->parent == slab) {
568 wsbmSetKernelBOFree(cache, slab->kbo);
569 free(slab->buffers);
570 free(slab);
580 struct _WsbmSlab *slab;
618 slab = sBuf->parent;
655 struct _WsbmSlab *slab;
678 slab = WSBMLISTENTRY(list, struct _WsbmSlab, head);
679 if (--slab->numFree == 0)
682 list = slab->freeBuffers.next;
801 struct _WsbmSlab *slab;
826 slab = sBuf->parent;
827 header = slab->header;