]> sourceware.org Git - newlib-cygwin.git/commitdiff
* heap.h (inheap): Check for NULL.
authorChristopher Faylor <me@cgf.cx>
Fri, 5 Oct 2001 04:36:14 +0000 (04:36 +0000)
committerChristopher Faylor <me@cgf.cx>
Fri, 5 Oct 2001 04:36:14 +0000 (04:36 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/child_info.h
winsup/cygwin/debug.h
winsup/cygwin/fork.cc
winsup/cygwin/heap.h

index d09b8a5c555915e34d1e2541fd72e31d6e57552b..a6ee4c4d5ec6595325125de0e63de9be2be22fd0 100644 (file)
@@ -1,3 +1,7 @@
+Fri Oct  5 00:31:35 2001  Christopher Faylor <cgf@cygnus.com>
+
+       * heap.h (inheap): Check for NULL.
+
 Thu Oct  4 23:17:49 2001  Christopher Faylor <cgf@cygnus.com>
 
        Add second path_conv * argument to fstat()s throughout.
index 983675877c3c02754d2fa25bd305010850229ebf..7827d853f1c5ac2dffd6d42efb73bb05fe6562bf 100644 (file)
@@ -12,7 +12,7 @@ details. */
 
 enum
 {
-  PROC_MAGIC = 0xaf12f000,
+  PROC_MAGIC = 0xaf13f000,
   PROC_FORK = PROC_MAGIC + 1,
   PROC_EXEC = PROC_MAGIC + 2,
   PROC_SPAWN = PROC_MAGIC + 3,
index 8323e617a2b3dfc0bfd304ce8373a5eab41b0830..fdd3d3ccd97f2706dfac1dd996a5133eb1e54056 100644 (file)
@@ -13,6 +13,12 @@ details. */
 #include "dlmalloc.h"
 #define MALLOC_CHECK ({\
   debug_printf ("checking malloc pool");\
+  free (malloc (20));\
+  free (malloc (128));\
+  free (malloc (4096));\
+  free (malloc (16384));\
+  free (malloc (32768));\
+  free (malloc (65536));\
   (void)mallinfo ();\
 })
 #endif
index 78d1abe010209ccb577ab81007af908aa48f574e..adac0ce9dce1ec25c6291a2e55ef05662d46bac5 100644 (file)
@@ -315,6 +315,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
   /* Initialize signal/process handling */
   sigproc_init ();
   __pthread_atforkchild ();
+  MALLOC_CHECK;
   cygbench ("fork-child");
   return 0;
 }
index df652ac220b51c627007f80cd28e12e2f32691a6..bcea4bae076234b7f3c2ac3245177d7238987652 100644 (file)
@@ -15,5 +15,5 @@ void heap_init ();
 void malloc_init ();
 
 #define inheap(s) \
-  (cygheap->heapptr && ((char *) (s) >= (char *) cygheap->heapbase) \
+  (cygheap->heapptr && s && ((char *) (s) >= (char *) cygheap->heapbase) \
    && ((char *) (s) <= (char *) cygheap->heaptop))
This page took 0.038413 seconds and 5 git commands to generate.