提交 c57a03ca 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

place -ljemalloc first in the link order, to avoid accidentally mixing

memory allocators. this fixes a bug that caused gdb to crash.. now utest gets good scalability for random add/remove operations on a 1024-element crange: nickolai@ben:~/proj/xv6$ for n in 1 2 4 8 16 32 64 80; do ( time ./o.user/utest -n $n ) 2>&1 | grep ^real | awk '{print "'$n'", $2;}'; done 1 0m21.570s 2 0m16.342s 4 0m9.997s 8 0m5.484s 16 0m3.218s 32 0m1.978s 64 0m1.741s 80 0m1.814s nickolai@ben:~/proj/xv6$
上级 0429559b
......@@ -6,7 +6,7 @@ $(O)/utest: $(O)/kernel/crange.o \
$(O)/user/umain.o
@echo " LD $@"
$(Q)mkdir -p $(@D)
$(Q)$(CXX) -o $@ $^ -lpthread -lrt -ljemalloc
$(Q)$(CXX) -o $@ $^ -ljemalloc -lpthread -lrt
.PRECIOUS: $(O)/user/%.o
-include $(O)/user/*.d
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论