Minor performance-related changes.
This commit is contained in:
parent
8ca34f40ec
commit
e8d1a2fa40
7
Makefile
7
Makefile
|
|
@ -20,7 +20,8 @@ ifeq ($(DEBUG),yes)
|
||||||
PROFILE := no
|
PROFILE := no
|
||||||
dummy := $(shell $(RM) rosella $(OBJS) $(GCDA) $(GCNO))
|
dummy := $(shell $(RM) rosella $(OBJS) $(GCDA) $(GCNO))
|
||||||
else
|
else
|
||||||
CFLAGS += -O3 -DNDEBUG -march=nocona
|
CFLAGS += -march=native -O2 -fomit-frame-pointer -mssse3 -mfpmath=sse
|
||||||
|
CFLAGS += -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROFILE),yes)
|
ifeq ($(PROFILE),yes)
|
||||||
|
|
@ -33,6 +34,10 @@ ifneq (,$(wildcard *.gcda mods/*.gcda))
|
||||||
dummy := $(shell $(RM) rosella $(OBJS))
|
dummy := $(shell $(RM) rosella $(OBJS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CPPFLAGS += $(EXTRA_CPPFLAGS)
|
||||||
|
CFLAGS += $(EXTRA_CFLAGS)
|
||||||
|
LDFLAGS += $(EXTRA_LDFLAGS)
|
||||||
|
|
||||||
all: rosella
|
all: rosella
|
||||||
depend: $(DEPS)
|
depend: $(DEPS)
|
||||||
|
|
||||||
|
|
|
||||||
5
gc.c
5
gc.c
|
|
@ -837,8 +837,11 @@ static void _collect_garbage(size_t min_free)
|
||||||
} while (gc_max_size < need_bytes);
|
} while (gc_max_size < need_bytes);
|
||||||
|
|
||||||
/* Reallocate the unused space. */
|
/* Reallocate the unused space. */
|
||||||
free(gc_ranges[gc_other_range()]);
|
{
|
||||||
|
char *unused_range = gc_ranges[gc_other_range()];
|
||||||
gc_ranges[gc_other_range()] = (char*)malloc(gc_max_size);
|
gc_ranges[gc_other_range()] = (char*)malloc(gc_max_size);
|
||||||
|
free(unused_range);
|
||||||
|
}
|
||||||
|
|
||||||
/* See if reallocation succeeded. */
|
/* See if reallocation succeeded. */
|
||||||
if (!gc_ranges[gc_other_range()])
|
if (!gc_ranges[gc_other_range()])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue