Skip to content

Commit

Permalink
bugfix 2.3-->2.4 for files >8.35TB (conversion didn't start)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyFFM committed Jun 23, 2018
1 parent 60e0e28 commit 146be7e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ private void InitializeComponent()
this.MaximizeBox = false;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Johnny\'s POC1->POC2 Plot Converter v.2.3";
this.Text = "Johnny\'s POC1->POC2 Plot Converter v.2.4";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.grpConverter.ResumeLayout(false);
this.grpConverter.PerformLayout();
Expand Down Expand Up @@ -644,15 +644,15 @@ private string memNeeded()
nonces = Convert.ToInt32(x.SubItems[4].Text);
if (fastmode.Checked && outputDir.Text != "")
{
localmem = Math.Min((memoryLimit.Value-1), Math.Ceiling((decimal)nonces / (2 << 11)));
localmem = Math.Min((memoryLimit.Value-3), Math.Ceiling((decimal)nonces / (2 << 11)));
}
else
{
localmem = Math.Min((memoryLimit.Value - 1), Math.Ceiling((decimal)nonces / (2 << 12)));
localmem = Math.Min((memoryLimit.Value - 3), Math.Ceiling((decimal)nonces / (2 << 12)));
}
if (boost.Checked)
{
for(int i=0; localmem*(2<<i) < (memoryLimit.Value - 1); i++)
for(int i=0; localmem*(2<<i) < (memoryLimit.Value - 3); i++)
{
boostmulti = (2 << i);
}
Expand Down Expand Up @@ -814,7 +814,7 @@ private void Conversion(int[] index, string[] filename, int[] nonces)
{

// calc maximum nonces to read (limit)
int limit = Convert.ToInt32(memoryLimit.Value - 1) * 8192;
int limit = Convert.ToInt32(memoryLimit.Value - 3) * 8192;
//loop all tasks
for (int i = 0; i < index.Length; i++)
{
Expand All @@ -835,7 +835,7 @@ private void Conversion(int[] index, string[] filename, int[] nonces)
localmem = Math.Min(memoryLimit.Value, Math.Ceiling((decimal)nonces[i] / (2 << 12)));
if (boost.Checked)
{
for (int x = 0; localmem * (2 << x) < (memoryLimit.Value-1); x++)
for (int x = 0; localmem * (2 << x) < (memoryLimit.Value-3); x++)
{
{
boostmulti = (2 << x);
Expand Down Expand Up @@ -998,7 +998,7 @@ private void Conversion(int[] index, string[] filename, int[] nonces)
private void Conversion2(int[] index, string[] filename, int[] nonces)
{
// calc maximum nonces to read (limit)
int limit = Convert.ToInt32(memoryLimit.Value - 1) * 4096;
int limit = Convert.ToInt32(memoryLimit.Value - 3) * 4096;
//loop all tasks
for (int i = 0; i < index.Length; i++)
{
Expand All @@ -1019,7 +1019,7 @@ private void Conversion2(int[] index, string[] filename, int[] nonces)
localmem = Math.Min(memoryLimit.Value, Math.Ceiling((decimal)nonces[i] / (2 << 11)));
if (boost.Checked)
{
for (int x = 0; localmem * (2 << x) < (memoryLimit.Value - 1); x++)
for (int x = 0; localmem * (2 << x) < (memoryLimit.Value - 3); x++)
{
{
boostmulti = (2 << x);
Expand Down

0 comments on commit 146be7e

Please sign in to comment.