Function report | 
Source Code:lib\memweight.c | 
Create Date:2022-07-28 06:24:28 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:memweight - count the total number of bits set in memory area*@ptr: pointer to the start of the area*@bytes: the size of the area
Proto:size_t memweight(const void *ptr, size_t bytes)
Type:size_t
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const void * | ptr | |
| size_t | bytes | 
| 13 | ret = 0 | 
| 17 | When bytes > 0 && bitmap % sizeof(long) cycle ret += returns the hamming weight of a N-bit word( * bitmap) | 
| 22 | If longs Then | 
| 23 | BUG_ON(longs >= INT_MAX / BITS_PER_LONG) | 
| 24 | ret += bitmap_weight((unsignedlong * )bitmap, longs * BITS_PER_LONG) | 
| 34 | When bytes > 0 cycle ret += returns the hamming weight of a N-bit word( * bitmap) | 
| 37 | Return ret | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |