Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-28 10:00:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:reate_basic_memory_bitmaps - Create bitmaps to hold basic page information

Proto:int create_basic_memory_bitmaps(void)

Type:int

Parameter:Nothing

1082  error = 0
1084  If Set bits in this map correspond to the page frames the contents of which* should not be saved during the suspend. && Set bits in this map correspond to free page frames. Then Return 0
1086  Else BUG_ON(Set bits in this map correspond to the page frames the contents of which* should not be saved during the suspend. || Set bits in this map correspond to free page frames. )
1089  bm1 = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1090  If Not bm1 Then Return -ENOMEM
1093  error = memory_bm_create - Allocate memory for a memory bitmap.
1094  If error Then Go to Free_first_object
1097  bm2 = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1098  If Not bm2 Then Go to Free_first_bitmap
1101  error = memory_bm_create - Allocate memory for a memory bitmap.
1102  If error Then Go to Free_second_object
1105  Set bits in this map correspond to the page frames the contents of which* should not be saved during the suspend. = bm1
1106  Set bits in this map correspond to free page frames. = bm2
1107  mark_nosave_pages - Mark pages that should not be saved.*@bm: Memory bitmap.* Set the bits in @bm that correspond to the page frames the contents of which* should not be saved.
1109  pr_debug("Basic memory bitmaps created\n")
1111  Return 0
1113  Free_second_object :
1114  kfree - free previously allocated memory*@objp: pointer returned by kmalloc.* If @objp is NULL, no operation is performed.* Don't free memory not originally allocated by kmalloc()* or you will run into trouble.
1115  Free_first_bitmap :
1116  memory_bm_free(bm1, PG_UNSAFE_CLEAR)
1117  Free_first_object :
1118  kfree - free previously allocated memory*@objp: pointer returned by kmalloc.* If @objp is NULL, no operation is performed.* Don't free memory not originally allocated by kmalloc()* or you will run into trouble.
1119  Return -ENOMEM
Caller
NameDescribe
hibernatehibernate - Carry out system hibernation, including saving the image.
snapshot_open
snapshot_ioctl