* heap.h (inheap): Check for NULL.

This commit is contained in:
Christopher Faylor 2001-10-05 04:36:14 +00:00
parent 8d817b0f9e
commit f978840bee
5 changed files with 13 additions and 2 deletions

View 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.

View 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,

View 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

View 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;
}

View 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))