* Makefile.in (dtable_CFLAGS): Use -fomit-frame-pointer and -fcheck-new.

* cygheap.cc (cmalloc): Only emit system_printf warnings on failure if
DEBUGGING.
(crealloc): Ditto.
(ccalloc): Ditto.
* dtable.cc (build_fh_name): Treat NULL return from cnew as indicative of
EMFILE condition.
(build_fh_dev): Ditto.
(dtable::dup_worker): Handle NULL return from build_fh_pc.
(dtable::vfork_child_dup): Trust dup_worker to set errno.
* fhandler.h (fhandler_base::new): Mark as nothrow.
This commit is contained in:
Christopher Faylor
2005-08-08 04:06:07 +00:00
parent cbda22eb63
commit 6a7bea70f0
6 changed files with 54 additions and 19 deletions

View File

@@ -279,8 +279,8 @@ cmalloc (cygheap_types x, DWORD n)
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
if (!c)
{
system_printf ("cmalloc returned NULL");
#ifdef DEBUGGING
system_printf ("cmalloc returned NULL");
try_to_debug ();
#endif
}
@@ -298,8 +298,10 @@ crealloc (void *s, DWORD n)
cygheap_entry *c = tocygheap (s);
cygheap_types t = (cygheap_types) c->type;
c = (cygheap_entry *) _crealloc (c, sizeof_cygheap (n));
#ifdef DEBUGGING
if (!c)
system_printf ("crealloc returned NULL");
#endif
return creturn (t, c, n);
}
@@ -328,8 +330,10 @@ ccalloc (cygheap_types x, DWORD n, DWORD size)
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
if (c)
memset (c->data, 0, n);
#ifdef DEBUGGING
if (!c)
system_printf ("ccalloc returned NULL");
#endif
return creturn (x, c, n);
}