summaryrefslogtreecommitdiff
path: root/src/upb_def.c
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-12-05 19:54:38 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-12-05 19:54:38 -0800
commit08b4a91204ff7174c381f887d87878d8bb1181ff (patch)
tree431f22caea40a3ccc7e78b020b5245ac9de40d21 /src/upb_def.c
parent651c92ab33187b34d7878ac57427bbbc062662fa (diff)
Add a test for circularly-linked descriptors.
The test currently triggers valgrind-detected memory errors.
Diffstat (limited to 'src/upb_def.c')
-rw-r--r--src/upb_def.c5
1 files changed, 3 insertions, 2 deletions
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback