You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function 'int loadidlemap()' , there are code:
unsigned long long *p;
while ((len = read(idlefd, p, IDLEMAP_CHUNK_SIZE)) > 0) {
p += IDLEMAP_CHUNK_SIZE;
g_idlebufsize += len;
}
I think the code should be 'p += 1' other than 'p += IDLEMAP_CHUNK_SIZE', because the datatype of p is unsigned long long. 'p += 1' means add point *p by 8 bytes.
Also, I think 'idlemapp = (pfn / 64) * BITMAP_CHUNK_SIZE;' at line 146 should be 'idlemapp = (pfn / 64)' because of the datetype of g_idlebuf is also 'unsigned long long'.
And 'g_idlebufsize += len;' at line 249 should be 'g_idlebufsize += 1;' for the same reason.
I modified the code and they works well.
The text was updated successfully, but these errors were encountered:
In function 'int loadidlemap()' , there are code:
unsigned long long *p;
while ((len = read(idlefd, p, IDLEMAP_CHUNK_SIZE)) > 0) {
p += IDLEMAP_CHUNK_SIZE;
g_idlebufsize += len;
}
I think the code should be 'p += 1' other than 'p += IDLEMAP_CHUNK_SIZE', because the datatype of p is unsigned long long. 'p += 1' means add point *p by 8 bytes.
Also, I think 'idlemapp = (pfn / 64) * BITMAP_CHUNK_SIZE;' at line 146 should be 'idlemapp = (pfn / 64)' because of the datetype of g_idlebuf is also 'unsigned long long'.
And 'g_idlebufsize += len;' at line 249 should be 'g_idlebufsize += 1;' for the same reason.
I modified the code and they works well.
The text was updated successfully, but these errors were encountered: