* 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.
This commit is contained in:
parent
8d0bc156ef
commit
ffebb4fe0c
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2002-08-05 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* cygthread.cc (cygthread::stub): Change event creation to manual
|
* cygthread.cc (cygthread::stub): Change event creation to manual
|
||||||
|
|
|
@ -101,17 +101,9 @@ newh ()
|
||||||
|
|
||||||
for (hl = cygheap->debug.freeh; hl < cygheap->debug.freeh + NFREEH; hl++)
|
for (hl = cygheap->debug.freeh; hl < cygheap->debug.freeh + NFREEH; hl++)
|
||||||
if (hl->name == NULL)
|
if (hl->name == NULL)
|
||||||
goto out;
|
return hl;
|
||||||
|
|
||||||
/* All used up??? */
|
return NULL;
|
||||||
if ((hl = (handle_list *) malloc (sizeof *hl)) != NULL)
|
|
||||||
{
|
|
||||||
memset (hl, 0, sizeof (*hl));
|
|
||||||
hl->allocated = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
return hl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a handle to the linked list of known handles. */
|
/* Add a handle to the linked list of known handles. */
|
||||||
|
@ -136,8 +128,8 @@ add_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
|
||||||
if ((hl = newh ()) == NULL)
|
if ((hl = newh ()) == NULL)
|
||||||
{
|
{
|
||||||
here.unlock ();
|
here.unlock ();
|
||||||
system_printf ("couldn't allocate memory for %s(%d): %s(%p)",
|
debug_printf ("couldn't allocate memory for %s(%d): %s(%p)",
|
||||||
func, ln, name, h);
|
func, ln, name, h);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hl->h = h;
|
hl->h = h;
|
||||||
|
@ -160,10 +152,7 @@ delete_handle (handle_list *hl)
|
||||||
handle_list *hnuke = hl->next;
|
handle_list *hnuke = hl->next;
|
||||||
debug_printf ("nuking handle '%s'", hnuke->name);
|
debug_printf ("nuking handle '%s'", hnuke->name);
|
||||||
hl->next = hl->next->next;
|
hl->next = hl->next->next;
|
||||||
if (hnuke->allocated)
|
memset (hnuke, 0, sizeof (*hnuke));
|
||||||
free (hnuke);
|
|
||||||
else
|
|
||||||
memset (hnuke, 0, sizeof (*hnuke));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -81,7 +81,6 @@ extern int pinger;
|
||||||
|
|
||||||
struct handle_list
|
struct handle_list
|
||||||
{
|
{
|
||||||
BOOL allocated;
|
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *func;
|
const char *func;
|
||||||
|
|
Loading…
Reference in New Issue