summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygheap.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-08-08 04:06:07 +0000
committerChristopher Faylor <me@cgf.cx>2005-08-08 04:06:07 +0000
commit6a7bea70f0ec5a13f0f46be928f6c5284765ba53 (patch)
tree44294a6530e5b42e1a8ae827c856099a79bf3b44 /winsup/cygwin/cygheap.cc
parentcbda22eb63ac8841ed3f4ac94e0782dab562717a (diff)
downloadcygnal-6a7bea70f0ec5a13f0f46be928f6c5284765ba53.tar.gz
cygnal-6a7bea70f0ec5a13f0f46be928f6c5284765ba53.tar.bz2
cygnal-6a7bea70f0ec5a13f0f46be928f6c5284765ba53.zip
* 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.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 9f2f7d4b3..00f7b07e4 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -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);
}