[PPL-devel] [GIT] ppl/ppl(master): Let ppl_*_linear_partition/ 4 register its outputs to the allocator tracker.

Enea Zaffanella zaffanella at cs.unipr.it
Thu Mar 18 14:30:13 CET 2010


Module: ppl/ppl
Branch: master
Commit: 80eafa9e6f521b3b7087d12b16c8a22a7f5c1679
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=80eafa9e6f521b3b7087d12b16c8a22a7f5c1679

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Thu Mar 18 14:17:15 2010 +0100

Let ppl_*_linear_partition/4 register its outputs to the allocator tracker.

---

 .../ppl_interface_generator_prolog_cc_code.m4      |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/interfaces/Prolog/ppl_interface_generator_prolog_cc_code.m4 b/interfaces/Prolog/ppl_interface_generator_prolog_cc_code.m4
index cd1f2f7..9c72b81 100644
--- a/interfaces/Prolog/ppl_interface_generator_prolog_cc_code.m4
+++ b/interfaces/Prolog/ppl_interface_generator_prolog_cc_code.m4
@@ -479,8 +479,14 @@ ppl_ at CLASS@_linear_ at PARTITION@(Prolog_term_ref t_ph,
     Prolog_put_address(t_r_second, rsh);
     if (Prolog_unify(t_inters, t_r_first)
         && Prolog_unify(t_pset, t_r_second)) {
+      PPL_REGISTER(rfh);
+      PPL_REGISTER(rsh);
       return PROLOG_SUCCESS;
     }
+    else {
+      delete rfh;
+      delete rsh;
+    }
   }
   CATCH_ALL;
 }




More information about the PPL-devel mailing list