Bugzilla bug #15906: use the GC leak detector. Contributed by

Patrick Beard <beard@netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@52636 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%netscape.com 1999-11-03 01:33:03 +00:00
parent ad629fba04
commit 64b8be9959

View File

@ -40,6 +40,9 @@ PR_IMPLEMENT(PRThread *) PR_GetPrimaryThread()
#pragma mark -
#pragma mark CREATING MACINTOSH THREAD STACKS
#if defined(GC_LEAK_DETECTOR)
extern void* GC_malloc_atomic(PRUint32 size);
#endif
/*
** Allocate a new memory segment. We allocate it from our figment heap. Currently,
@ -58,7 +61,11 @@ PRStatus _MD_AllocSegment(PRSegment *seg, PRUint32 size, void *vaddr)
** Take the actual memory for the segment out of our Figment heap.
*/
#if defined(GC_LEAK_DETECTOR)
seg->vaddr = (char *)GC_malloc_atomic(size);
#else
seg->vaddr = (char *)malloc(size);
#endif
if (seg->vaddr == NULL) {