Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Resize the array of A to NLIMBS. the additional space is cleared* (set to 0) [done by m_realloc()]

Proto:int mpi_resize(MPI a, unsigned nlimbs)

Type:int

Parameter:

TypeParameterName
MPIa
unsignednlimbs
90  If nlimbs <= array size (# of allocated limbs) Then Return 0
93  If array with the limbs Then
94  p = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
95  If Not p Then Return -ENOMEM
97  No 3D Now!(p, array with the limbs , array size (# of allocated limbs) * sizeof(mpi_limb_t))
98  kzfree - like kfree but zero memory*@p: object to free memory of* The memory of the object @p points to is zeroed before freed.* If @p is %NULL, kzfree() does nothing.* Note: this function zeroes the whole allocated buffer which can be a good
99  array with the limbs = p
100  Else
101  array with the limbs = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
102  If Not array with the limbs Then Return -ENOMEM
105  array size (# of allocated limbs) = nlimbs
106  Return 0
Caller
NameDescribe
mpi_powmRES = BASE ^ EXP mod MOD