Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_kasan.c Create Date:2022-07-28 06:29:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:memcg_accounted_kmem_cache

Proto:static noinline void __init memcg_accounted_kmem_cache(void)

Type:void

Parameter:Nothing

409  size = 200
412  cache = kmem_cache_create("test_cache", size, 0, SLAB_ACCOUNT, NULL)
413  If Not cache Then
414  pr_err("Cache allocation failed\n")
415  Return
418  pr_info("allocate memcg accounted object\n")
423  When i < 5 cycle
424  p = kmem_cache_alloc(cache, GFP_KERNEL)
425  If Not p Then Go to free_cache
428  kmem_cache_free(cache, p)
429  msleep - sleep safely even with waitqueue interruptions*@msecs: Time in milliseconds to sleep for
432  free_cache :
433  kmem_cache_destroy(cache)
Caller
NameDescribe
kmalloc_tests_init