From f6cd7e592e468d2554409275a587dab97859fb79 Mon Sep 17 00:00:00 2001 From: Peter Clifton Date: Mon, 13 Oct 2008 19:20:06 +0000 Subject: [PATCH] Increase initial heap size from 32 to 256 In complex boards with lots of polygons, we were realloc'ing up to this kind of number anyway, in x2 size steps. Save all the memcpy'ing by making the heap larger to start with. My test board still has some requirement for heaps >256, <512, but the frequency is low. --- src/heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/heap.c b/src/heap.c index 39dcbe47..4959b58c 100644 --- a/src/heap.c +++ b/src/heap.c @@ -165,7 +165,7 @@ heap_insert (heap_t * heap, cost_t cost, void *data) { heap->max *= 2; if (heap->max == 0) - heap->max = 32; /* default initial heap size */ + heap->max = 256; /* default initial heap size */ heap->element = realloc (heap->element, heap->max * sizeof (*heap->element)); } -- 2.11.4.GIT