summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>1999-11-03 01:33:03 +0000
committerwtc%netscape.com <devnull@localhost>1999-11-03 01:33:03 +0000
commit9eb2a09c2840a358795325d5458d6b78c92115ae (patch)
tree7741ffc23b94a531031bab94366d5a1c87763d50
parent448a0cc5dbd3caf987365328f4c7e9bc46e8daf3 (diff)
downloadnspr-hg-9eb2a09c2840a358795325d5458d6b78c92115ae.tar.gz
Bugzilla bug #15906: use the GC leak detector. Contributed by
Patrick Beard <beard@netscape.com>.
-rw-r--r--pr/src/md/mac/macthr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pr/src/md/mac/macthr.c b/pr/src/md/mac/macthr.c
index 40d9be77..4ba10060 100644
--- a/pr/src/md/mac/macthr.c
+++ b/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) {