| Anonymous | Login | Signup for a new account | 2013-06-19 09:33 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000110 | OCaml | OCaml general | public | 2000-05-14 23:25 | 2000-06-05 15:02 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | no change required | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000110: Re: memory leak | |||||||
| Description | Hi, Thank you for your message to the Caml mailing list. However your message seems to be a bug report; hence I send it to the relevant mailing list caml-bugs@inria.fr Thank again for your interest in Caml. Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/ [^] > I have a memory leak which I believe arises from some problem in the > compiler. I've confirmed the leak for ocaml-2.04 and ocaml-3.00. The > problem is centered around the flag 'stupid' in the following code. > If 'stupid = true' there is a serious memory leak. If 'stupid = false' > there is no memory leak. This is the only place in the code this flag > is used and all subfunctions are side-effect free. > > let detection oneway stupid get_start_belief clean sigma or_sigma distance > orientation seer_id seen_id seer_beliefs seen_beliefs = > let dims_1 = Array.init 2 (fun x -> x) in > let dims_2 = Array.init 3 (fun x -> x) in > let rec dring_1 = Sample.x::Sample.y::dring_1 in > let rec dring_2 = Sample.x::Sample.y::Sample.theta::dring_2 in > > let seer_sample_for_seen, seer_beliefs = > if stupid then Belief_states.Map.find seer_id seer_beliefs, seer_beliefs > else Belief_states.get get_start_belief seen_id seer_id seer_beliefs in > let seen_according_to_seer = > clean (Array.map (to_observed distance sigma orientation or_sigma) seer_sample_for_seen) in > > let seen_belief = Belief_states.Map.find seen_id seen_beliefs in > > let new_seen_belief = > integrator oneway dims_1 dims_2 0.01 dring_1 dring_2 seen_according_to_seer seen_belief in > > let new_seen_beliefs = Belief_states.Map.add seen_id new_seen_belief seen_beliefs in > > let new_seer_beliefs = > if not oneway or true then > let seen_sample_for_seer, seen_beliefs = > if stupid then Belief_states.Map.find seen_id seen_beliefs, seen_beliefs > else Belief_states.get get_start_belief seer_id seen_id seen_beliefs in > > let seer_according_to_seen = > clean (Array.map (to_observer distance sigma) seen_sample_for_seer) in > > let seer_belief = Belief_states.Map.find seer_id seer_beliefs in > > let new_seer_belief = > integrator oneway dims_2 dims_2 0.01 dring_2 dring_2 seer_according_to_seen seer_belief in > let new_seer_beliefs = Belief_states.Map.add seer_id new_seer_belief seer_beliefs in > new_seer_beliefs > else seer_beliefs in > new_seer_beliefs, new_seen_beliefs > > Does anyone have an idea for how to debug this or what the underlying > problem is? Naturally, I can try cutting code to isolate the bug > further but that approach seems awkward as the overall program (which > is used for monte carlo multi robot localization) is not very small. > > -John | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0002112) administrator (administrator) 2000-06-05 15:02 |
Not enough context to understand what's going on. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |