From 08b4a91204ff7174c381f887d87878d8bb1181ff Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 5 Dec 2009 19:54:38 -0800 Subject: Add a test for circularly-linked descriptors. The test currently triggers valgrind-detected memory errors. --- src/upb_def.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/upb_def.c') diff --git a/src/upb_def.c b/src/upb_def.c index 08140e4..bc4f293 100644 --- a/src/upb_def.c +++ b/src/upb_def.c @@ -27,8 +27,9 @@ static int div_round_up(int numerator, int denominator) { // // Our scheme is as follows. First we give each def a flag indicating whether // it is part of a cycle or not. Because defs are immutable, this flag will -// never change. For acyclic defs, we can use a naive algorithm and avoid -// the overhead of dealing with cycles. Most defs will be acyclic. +// never change. For acyclic defs, we can use a naive algorithm and avoid the +// overhead of dealing with cycles. Most defs will be acyclic, and most cycles +// will be very short. // // For defs that participate in cycles we keep two reference counts. One // tracks references that come from outside the cycle (we call these external -- cgit v1.2.3