From 64b8be99592da12e77906a4c2a9f6d7299286ca9 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Wed, 3 Nov 1999 01:33:03 +0000 Subject: [PATCH] Bugzilla bug #15906: use the GC leak detector. Contributed by Patrick Beard . git-svn-id: svn://10.0.0.236/trunk@52636 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/pr/src/md/mac/macthr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mozilla/nsprpub/pr/src/md/mac/macthr.c b/mozilla/nsprpub/pr/src/md/mac/macthr.c index 40d9be77a29..4ba10060a39 100644 --- a/mozilla/nsprpub/pr/src/md/mac/macthr.c +++ b/mozilla/nsprpub/pr/src/md/mac/macthr.c @@ -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) {