[sgen] Remove unused function
[mono.git] / mono / sgen / sgen-nursery-allocator.c
index 77a3aa866f743573c2c04da3c52352506d970e0a..2c192f0e904ab298cbe3b6effa7919badd391aa3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-nursery-allocator.c: Nursery allocation code.
+/**
+ * \file
+ * Nursery allocation code.
  *
  * Copyright 2009-2010 Novell, Inc.
  *           2011 Rodrigo Kumpera
@@ -71,10 +72,10 @@ static char *nursery_last_pinned_end = NULL;
 char *sgen_nursery_start;
 char *sgen_nursery_end;
 
-#ifdef USER_CONFIG
+/* good sizes are 512KB-1MB: larger ones increase a lot memzeroing time */
 size_t sgen_nursery_size = (1 << 22);
+/* The number of trailing 0 bits in sgen_nursery_size */
 int sgen_nursery_bits = 22;
-#endif
 
 char *sgen_space_bitmap;
 size_t sgen_space_bitmap_size;
@@ -455,33 +456,6 @@ restart:
        return NULL;
 }
 
-void*
-sgen_fragment_allocator_serial_alloc (SgenFragmentAllocator *allocator, size_t size)
-{
-       SgenFragment *frag;
-       SgenFragment **previous;
-#ifdef NALLOC_DEBUG
-       InterlockedIncrement (&alloc_count);
-#endif
-
-       previous = &allocator->alloc_head;
-
-       for (frag = *previous; frag; frag = *previous) {
-               char *p = (char *)serial_alloc_from_fragment (previous, frag, size);
-
-               HEAVY_STAT (++stat_alloc_iterations);
-
-               if (p) {
-#ifdef NALLOC_DEBUG
-                       add_alloc_record (p, size, FIXED_ALLOC);
-#endif
-                       return p;
-               }
-               previous = &frag->next;
-       }
-       return NULL;
-}
-
 void*
 sgen_fragment_allocator_serial_range_alloc (SgenFragmentAllocator *allocator, size_t desired_size, size_t minimum_size, size_t *out_alloc_size)
 {
@@ -798,13 +772,6 @@ sgen_build_nursery_fragments (GCMemSection *nursery_section, SgenGrayQueue *unpi
        return fragment_total;
 }
 
-char *
-sgen_nursery_alloc_get_upper_alloc_bound (void)
-{
-       /*FIXME we need to calculate the collector upper bound as well, but this must be done in the previous GC. */
-       return sgen_nursery_end;
-}
-
 /*** Nursery memory allocation ***/
 void
 sgen_nursery_retire_region (void *address, ptrdiff_t size)