+2002-08-06 Conrad Scott <conrad.scott@dsl.pipex.com>
+
+ * debug.h (handle_list::allocated): Remove field.
+ * debug.cc (newh): Don't malloc extra entries.
+ (add_handle): Downgrade strace message level.
+ (delete_handle): Remove case for `allocated' entries.
+
2002-08-05 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::stub): Change event creation to manual
for (hl = cygheap->debug.freeh; hl < cygheap->debug.freeh + NFREEH; hl++)
if (hl->name == NULL)
- goto out;
-
- /* All used up??? */
- if ((hl = (handle_list *) malloc (sizeof *hl)) != NULL)
- {
- memset (hl, 0, sizeof (*hl));
- hl->allocated = TRUE;
- }
+ return hl;
-out:
- return hl;
+ return NULL;
}
/* Add a handle to the linked list of known handles. */
if ((hl = newh ()) == NULL)
{
here.unlock ();
- system_printf ("couldn't allocate memory for %s(%d): %s(%p)",
- func, ln, name, h);
+ debug_printf ("couldn't allocate memory for %s(%d): %s(%p)",
+ func, ln, name, h);
return;
}
hl->h = h;
handle_list *hnuke = hl->next;
debug_printf ("nuking handle '%s'", hnuke->name);
hl->next = hl->next->next;
- if (hnuke->allocated)
- free (hnuke);
- else
- memset (hnuke, 0, sizeof (*hnuke));
+ memset (hnuke, 0, sizeof (*hnuke));
}
void