[m-rev.] trivial diff: cleanups to mercury_memory_zones.[ch]

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 21 21:34:04 AEST 2002


Estimated hours taken: 0.5
Branches: main

runtime/mercury_memory_zones.h:
	Delete the declaration of and misleading comment for
	MR_init_memory_arena(), since that function no longer exists
	(it was deleted years ago).

runtime/mercury_memory_zones.c:
	Add curly braces around the body of an if statement,
	to match our coding conventions.

Workspace: /home/earth/fjh/ws-earth3/mercury
Index: runtime/mercury_memory_zones.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory_zones.c,v
retrieving revision 1.20
diff -u -d -r1.20 mercury_memory_zones.c
--- runtime/mercury_memory_zones.c	4 Jun 2002 09:12:24 -0000	1.20
+++ runtime/mercury_memory_zones.c	30 Jul 2002 05:33:19 -0000
@@ -130,8 +130,9 @@
 	}
 
   #ifdef MR_CONSERVATIVE_GC
-	if (ptr != NULL)
+	if (ptr != NULL) {
 		GC_add_roots((char *)ptr, (char *)ptr + size);
+	}
   #endif
 	return ptr;
 }
Index: runtime/mercury_memory_zones.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory_zones.h,v
retrieving revision 1.13
diff -u -d -r1.13 mercury_memory_zones.h
--- runtime/mercury_memory_zones.h	18 Feb 2002 07:01:18 -0000	1.13
+++ runtime/mercury_memory_zones.h	30 Jul 2002 05:23:59 -0000
@@ -169,17 +169,6 @@
 #endif
 
 /*
-** MR_init_memory_arena() allocates (if necessary) the top-level memory pool
-** from which all allocations should come. If PARALLEL is defined, then
-** this pool should be shared memory. In the absence of PARALLEL, it
-** doesn't need to do anything, since with MR_CONSERVATIVE_GC, the collector
-** manages the heap, and without GC, we can allocate memory using memalign
-** or malloc.
-*/
-
-extern	void		MR_init_memory_arena(void);
-
-/*
 ** MR_init_zones() initializes the memory zone pool and the offset
 ** generator.  It should be used before any zones are created or
 ** offsets requested.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list