• Home
  • Raw
  • Download

Lines Matching refs:b

210 static void slob_free_pages(void *b, int order)  in slob_free_pages()  argument
212 struct page *sp = virt_to_page(b); in slob_free_pages()
306 slob_t *b = NULL; in slob_alloc() local
333 b = slob_page_alloc(sp, size, align, align_offset, &page_removed_from_list); in slob_alloc()
334 if (!b) in slob_alloc()
357 if (!b) { in slob_alloc()
358 b = slob_new_pages(gfp & ~__GFP_ZERO, 0, node); in slob_alloc()
359 if (!b) in slob_alloc()
361 sp = virt_to_page(b); in slob_alloc()
366 sp->freelist = b; in slob_alloc()
368 set_slob(b, SLOB_UNITS(PAGE_SIZE), b + SLOB_UNITS(PAGE_SIZE)); in slob_alloc()
370 b = slob_page_alloc(sp, size, align, align_offset, &_unused); in slob_alloc()
371 BUG_ON(!b); in slob_alloc()
375 memset(b, 0, size); in slob_alloc()
376 return b; in slob_alloc()
385 slob_t *prev, *next, *b = (slob_t *)block; in slob_free() local
406 slob_free_pages(b, 0); in slob_free()
413 sp->freelist = b; in slob_free()
414 set_slob(b, units, in slob_free()
415 (void *)((unsigned long)(b + in slob_free()
433 if (b < (slob_t *)sp->freelist) { in slob_free()
434 if (b + units == sp->freelist) { in slob_free()
438 set_slob(b, units, sp->freelist); in slob_free()
439 sp->freelist = b; in slob_free()
443 while (b > next) { in slob_free()
448 if (!slob_last(prev) && b + units == next) { in slob_free()
450 set_slob(b, units, slob_next(next)); in slob_free()
452 set_slob(b, units, next); in slob_free()
454 if (prev + slob_units(prev) == b) { in slob_free()
455 units = slob_units(b) + slob_units(prev); in slob_free()
456 set_slob(prev, units, slob_next(b)); in slob_free()
458 set_slob(prev, slob_units(prev), b); in slob_free()
602 void *b; in slob_alloc_node() local
610 b = slob_alloc(c->size, flags, c->align, node, 0); in slob_alloc_node()
611 trace_kmem_cache_alloc_node(_RET_IP_, b, c->object_size, in slob_alloc_node()
615 b = slob_new_pages(flags, get_order(c->size), node); in slob_alloc_node()
616 trace_kmem_cache_alloc_node(_RET_IP_, b, c->object_size, in slob_alloc_node()
621 if (b && c->ctor) { in slob_alloc_node()
623 c->ctor(b); in slob_alloc_node()
626 kmemleak_alloc_recursive(b, c->size, 1, c->flags, flags); in slob_alloc_node()
627 return b; in slob_alloc_node()
650 static void __kmem_cache_free(void *b, int size) in __kmem_cache_free() argument
653 slob_free(b, size); in __kmem_cache_free()
655 slob_free_pages(b, get_order(size)); in __kmem_cache_free()
661 void *b = (void *)slob_rcu - (slob_rcu->size - sizeof(struct slob_rcu)); in kmem_rcu_free() local
663 __kmem_cache_free(b, slob_rcu->size); in kmem_rcu_free()
666 void kmem_cache_free(struct kmem_cache *c, void *b) in kmem_cache_free() argument
668 kmemleak_free_recursive(b, c->flags); in kmem_cache_free()
671 slob_rcu = b + (c->size - sizeof(struct slob_rcu)); in kmem_cache_free()
675 __kmem_cache_free(b, c->size); in kmem_cache_free()
678 trace_kmem_cache_free(_RET_IP_, b); in kmem_cache_free()