Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4090 > unrolled thread

Windows possible memory leak

Started by"McHale, Paul" <Paul.McHale@excelitas.com>
First post2011-07-31 11:26 +0000
Last post2011-07-31 11:26 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Windows possible memory leak "McHale, Paul" <Paul.McHale@excelitas.com> - 2011-07-31 11:26 +0000

#4090 — Windows possible memory leak

From"McHale, Paul" <Paul.McHale@excelitas.com>
Date2011-07-31 11:26 +0000
SubjectWindows possible memory leak
Message-ID<j13e4t$535$1@smc.vnet.net>
I wanted to compare rules based processing performance to Table[] based processing performance.  The following code section assumes the data was read in and certain variables are set.  I executed the same code about 10 times in a row to get the output formatted and the comments/coding the way I wanted to leave it.  I don't believe this code creates more data every time it is executed.  I could be wrong.  I believe the first time it is run, variables are created.  Each subsequent run overwrites the variables.

How do I end up with the "Out of memory" error?  I should be able to "Shift-Enter" this all day long.  I didn't lose anything.  I just needed to reload certain data.  It isn't just this code.  It has happened many times before on other code.  If I am doing something wrong, let me know so I can mend my ways :)  Otherwise, I am inclined to believe there is some memory management (or setting?) issue.  Running the same code over and over again should yield the same results (memory wise ;) )


(*  Perform rule based processing  *)
RuleStartTime=Date[];
mListRule=InData /. {AA_,BB_,CC_,DD_,EE_,FF_} -> {
{AA*mTimeCal,DD*mDivideBy*Calibration[[3]][[1]]+Calibration[[3]][[2]]},
{AA*mTimeCal,EE*mDivideBy*Calibration[[4]][[1]]+Calibration[[4]][[2]]},{AA*mTimeCal,FF*mDivideBy*Calibration[[5]][[1]]+Calibration[[5]][[2]]}};
RuleStopTime=Date[];
"Rule based processing time: "<> ToString @ DateDifference[RuleStartTime,RuleStopTime,"Second"]

(*  Perform Table[] based processing  *)
TableStartTime=Date[];
mData=Table[
{{InData[[i,1]]*mTimeCal,InData[[i,4]]*mDivideBy*Calibration[[3]][[1]]+Calibration[[3]][[2]]},{InData[[i,1]]*mTimeCal,InData[[i,5]]*mDivideBy*Calibration[[4]][[1]]+Calibration[[4]][[2]]},{InData[[i,1]]*mTimeCal,InData[[i,6]]*mDivideBy*Calibration[[5]][[1]]+Calibration[[5]][[2]]}},
{i,1,Length[InData]}
];
TableStopTime=Date[];
"Table based processing time: "<> ToString @ DateDifference[TableStartTime,TableStopTime,"Second"]

(* Compare the two results *)
"Comnparing the two results mListRule ==  mData -> " <> ToString @ (mListRule==  mData)

Rule based processing time: {3.01541, Second}
Table based processing time: {1.29678, Second}
Comnparing the two results mListRule ==  mData -> True


Thanks,
Paul





Paul McHale  |  Electrical Engineer, Energetics Systems  |  Excelitas Technologies Corp.

Phone:   +1 937.865.3004   |   Fax:  +1 937.865.5170   |   Mobile:   +1 937.371.2828
1100 Vanguard Blvd, Miamisburg, Ohio 45342-0312 USA
Paul.McHale@Excelitas.com<mailto:Paul.McHale@perkinelmer.com>
www.excelitas.com<http://www.excelitas.com>

[cid:image001.png@01CB9136.E3D96D90]

Please consider the environment before printing this e-mail.
This email message and any attachments are confidential and proprietary to Excelitas Technologies Corp. If you are not the intended recipient of this message, please inform the sender by replying to this email or sending a message to the sender and destroy the message and any attachments.
Thank you

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web