mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 02:40:08 +00:00
* nscd/mem.c (markrange): Add assert to check entries are all
aligned. Small cleanup in bitmap use.
This commit is contained in:
parent
8884028c8e
commit
77d40f10ec
@ -1,5 +1,8 @@
|
||||
2008-05-17 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nscd/mem.c (markrange): Add assert to check entries are all
|
||||
aligned. Small cleanup in bitmap use.
|
||||
|
||||
* nscd/nscd.h (mem_in_flight): Replace blockaddr field with
|
||||
blockoff of type nscd_ssize_t.
|
||||
* nscd/mem.c (gc): Simplify markrange call for on-flight blocks.
|
||||
|
@ -79,6 +79,7 @@ static void
|
||||
markrange (BITMAP_T *mark, ref_t start, size_t len)
|
||||
{
|
||||
/* Adjust parameters for block alignment. */
|
||||
assert ((start & BLOCK_ALIGN_M1) == 0);
|
||||
start /= BLOCK_ALIGN;
|
||||
len = (len + BLOCK_ALIGN_M1) / BLOCK_ALIGN;
|
||||
|
||||
@ -93,7 +94,7 @@ markrange (BITMAP_T *mark, ref_t start, size_t len)
|
||||
return;
|
||||
}
|
||||
|
||||
mark[elem++] |= 0xff << (start % BITS);
|
||||
mark[elem++] |= ALLBITS << (start % BITS);
|
||||
len -= BITS - (start % BITS);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user