Skip to content

Commit

Permalink
Fix for Mantis bug 1982
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 10, 2022
1 parent 70ff5f4 commit 8af83ac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
10 changes: 5 additions & 5 deletions inform7/Figures/memory-diagnostics.txt
@@ -1,6 +1,6 @@
Total memory consumption was 126308K = 123 MB

---- was used for 2008021 objects, in 360796 frames in 0 x 800K = 0K = 0 MB:
---- was used for 2008022 objects, in 360797 frames in 0 x 800K = 0K = 0 MB:

32.3% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes
18.9% text_stream_array 4342 x 100 = 434200 objects, 24454144 bytes
Expand Down Expand Up @@ -44,7 +44,7 @@ Total memory consumption was 126308K = 123 MB
0.2% inference_subject 665 objects, 260680 bytes
0.1% vanilla_function 3678 objects, 235392 bytes
0.1% binary_predicate 321 objects, 169488 bytes
0.1% hierarchy_location 1120 objects, 161280 bytes
0.1% hierarchy_location 1121 objects, 161424 bytes
0.1% linguistic_stock_item 3316 objects, 159168 bytes
0.1% rule_family_data 400 objects, 147200 bytes
0.1% nonterminal 760 objects, 139840 bytes
Expand All @@ -59,7 +59,7 @@ Total memory consumption was 126308K = 123 MB
---- lexical_cluster 2517 objects, 80544 bytes
---- pcalc_term_array 2 x 1000 = 2000 objects, 80064 bytes
---- kind_variable_declaration 1652 objects, 79296 bytes
---- inter_tree 6 objects, 79200 bytes
---- inter_tree 6 objects, 79248 bytes
---- label_namespace 1468 objects, 70464 bytes
---- rulebook 407 objects, 68376 bytes
---- spatial_data 670 objects, 64320 bytes
Expand Down Expand Up @@ -237,7 +237,7 @@ Total memory consumption was 126308K = 123 MB

100.0% was used for memory not allocated for objects:

59.2% text stream storage 76626172 bytes in 452197 claims
59.2% text stream storage 76626600 bytes in 452201 claims
3.5% dictionary storage 4544512 bytes in 6619 claims
---- sorting 744 bytes in 3 claims
5.5% source text 7200000 bytes in 3 claims
Expand All @@ -255,5 +255,5 @@ Total memory consumption was 126308K = 123 MB
---- code generation workspace for objects 1336 bytes in 4 claims
0.2% emitter array storage 279776 bytes in 1995 claims

-140.-5% was overhead - -181849200 bytes = -177587K = -173 MB
-140.-5% was overhead - -181849392 bytes = -177587K = -173 MB

16 changes: 8 additions & 8 deletions inform7/Figures/timings-diagnostics.txt
@@ -1,8 +1,8 @@
100.0% in inform7 run
68.3% in compilation to Inter
68.1% in compilation to Inter
47.9% in //Sequence::undertake_queued_tasks//
4.5% in //MajorNodes::pre_pass//
3.2% in //MajorNodes::pass_1//
3.1% in //MajorNodes::pass_1//
2.4% in //RTPhrasebook::compile_entries//
1.8% in //ImperativeDefinitions::assess_all//
1.5% in //RTKindConstructors::compile//
Expand All @@ -19,16 +19,16 @@
0.1% in //Understand::traverse//
0.1% in //World::stages_II_and_III//
2.0% not specifically accounted for
29.0% in running Inter pipeline
10.1% in step 14/15: generate inform6 -> auto.inf
29.2% in running Inter pipeline
10.3% in step 14/15: generate inform6 -> auto.inf
7.6% in step 5/15: load-binary-kits
6.5% in step 6/15: make-synoptic-module
1.6% in step 9/15: make-identifiers-unique
0.5% in step 4/15: compile-splats
6.7% in step 6/15: make-synoptic-module
1.5% in step 9/15: make-identifiers-unique
0.4% in step 12/15: eliminate-redundant-operations
0.4% in step 4/15: compile-splats
0.4% in step 7/15: shorten-wiring
0.3% in step 11/15: eliminate-redundant-labels
0.3% in step 8/15: detect-indirect-calls
0.2% in step 11/15: eliminate-redundant-labels
0.1% in step 10/15: reconcile-verbs
0.1% in step 2/15: parse-insertions
0.1% in step 3/15: resolve-conditional-compilation
Expand Down
10 changes: 7 additions & 3 deletions inform7/Internal/Inter/WorldModelKit/Sections/WorldModel.i6t
Expand Up @@ -683,9 +683,13 @@ must either completely contain another region, or else have no overlap with it.)
rtrue;
rfalse;
}
if (~~(obj ofclass K1_room)) obj = LocationOf(obj);
if (obj == nothing) rfalse;
o = obj.map_region;
if (obj ofclass K9_region) {
o = obj;
} else {
if (~~(obj ofclass K1_room)) obj = LocationOf(obj);
if (obj == nothing) rfalse;
o = obj.map_region;
}
while (o) {
if (o == region) rtrue;
o = parent(o);
Expand Down

0 comments on commit 8af83ac

Please sign in to comment.