Only skip *ranges* initialization if we've already been started.
authorOrion Lawlor <olawlor@acm.org>
Fri, 7 Jun 2002 20:16:32 +0000 (20:16 +0000)
committerOrion Lawlor <olawlor@acm.org>
Fri, 7 Jun 2002 20:16:32 +0000 (20:16 +0000)
Skipping everything leaves our Cpv myss uninitialized, which
crashes uth- versions of code that calls isomalloc.

src/conv-core/isomalloc.c

index 7af1749b4f75d837c9cbc42a649f9ea382afb2c8..04d3a7f3e748fdd66aa16137c69c5084f8bee2b2 100644 (file)
@@ -472,8 +472,6 @@ static void init_ranges(char **argv)
   /*Largest value a signed int can hold*/
   memRange_t intMax=((memRange_t)1)<<(sizeof(int)*8-1)-1;
 
-  if (isomallocStart!=NULL) return; /*Must already be initialized.*/
-
   /*Round slot size up to nearest page size*/
   slotsize=16*1024;
   slotsize=(slotsize+CMK_MEMORY_PAGESIZE-1) & ~(CMK_MEMORY_PAGESIZE-1);
@@ -482,6 +480,7 @@ static void init_ranges(char **argv)
 #endif
 
   /* Find the largest unused region of virtual address space */
+  if (isomallocStart==NULL)
   {
     char *staticData =(char *) __static_data_loc();
     char *code = (char *)&init_ranges;