mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 02:40:08 +00:00
* nscd/mem.c (gc): Fix test for stack overuse.
This commit is contained in:
parent
5c9629d2e3
commit
b21595750e
@ -1,5 +1,7 @@
|
||||
2008-05-17 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nscd/mem.c (gc): Fix test for stack overuse.
|
||||
|
||||
* nscd/aicache.c (addhstaiX): Fix a few small problems, cleanups,
|
||||
more asserts.
|
||||
|
||||
|
@ -132,12 +132,12 @@ gc (struct database_dyn *db)
|
||||
stack_used = 0;
|
||||
size_t memory_needed = ((db->head->first_free / BLOCK_ALIGN + BITS - 1)
|
||||
/ BITS) * sizeof (BITMAP_T);
|
||||
if (memory_needed <= MAX_STACK_USE)
|
||||
if (stack_used + memory_needed <= MAX_STACK_USE)
|
||||
{
|
||||
mark = (BITMAP_T *) alloca (memory_needed);
|
||||
mark_use_malloc = false;
|
||||
memset (mark, '\0', memory_needed);
|
||||
stack_used = memory_needed;
|
||||
stack_used += memory_needed;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user