+
+
+\f
+/***********************************************************************
+ Initialization
+ ***********************************************************************/
+
+/* Initialize various things for memory allocation. */
+
+static void
+r_alloc_init ()
+{
+ if (r_alloc_initialized)
+ return;
+ r_alloc_initialized = 1;
+
+ page_size = PAGE;
+#ifndef SYSTEM_MALLOC
+ real_morecore = __morecore;
+ __morecore = r_alloc_sbrk;
+
+ first_heap = last_heap = &heap_base;
+ first_heap->next = first_heap->prev = NIL_HEAP;
+ first_heap->start = first_heap->bloc_start
+ = virtual_break_value = break_value = (*real_morecore) (0);
+ if (break_value == NIL)
+ abort ();
+
+ extra_bytes = ROUNDUP (50000);
+#endif
+
+#ifdef DOUG_LEA_MALLOC
+ BLOCK_INPUT;
+ mallopt (M_TOP_PAD, 64 * 4096);
+ UNBLOCK_INPUT;
+#else
+#ifndef SYSTEM_MALLOC
+ /* Give GNU malloc's morecore some hysteresis
+ so that we move all the relocatable blocks much less often. */
+ __malloc_extra_blocks = 64;
+#endif
+#endif
+
+#ifndef SYSTEM_MALLOC
+ first_heap->end = (POINTER) ROUNDUP (first_heap->start);
+
+ /* The extra call to real_morecore guarantees that the end of the
+ address space is a multiple of page_size, even if page_size is
+ not really the page size of the system running the binary in
+ which page_size is stored. This allows a binary to be built on a
+ system with one page size and run on a system with a smaller page
+ size. */
+ (*real_morecore) ((char *) first_heap->end - (char *) first_heap->start);
+
+ /* Clear the rest of the last page; this memory is in our address space
+ even though it is after the sbrk value. */
+ /* Doubly true, with the additional call that explicitly adds the
+ rest of that page to the address space. */
+ bzero (first_heap->start,
+ (char *) first_heap->end - (char *) first_heap->start);
+ virtual_break_value = break_value = first_heap->bloc_start = first_heap->end;
+#endif
+
+ use_relocatable_buffers = 1;
+}
+
+/* arch-tag: 6a524a15-faff-44c8-95d4-a5da6f55110f
+ (do not change this comment) */