1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication2
{
public partial class Form1 : Form
{
private static TV[] T;
private struct TL
{
private Byte a, b, c;
}
private struct TV
{
private UInt32 a;
private SByte b;
private Int16 c;
private SByte d;
private TL e;
private Byte f;
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{//init:gestionnaire des tâches à 637mo
ModifSize(32);
}//ici le gestionnaire des tâches indique 669 (+32mo):normal
private void button1_Click(object sender, EventArgs e)
{
ModifSize(32);//1er click:gestionnaire des tâches à 669mo
}//ici le gestionnaire des tâches indique 701 (+32mo):anormal
private void ModifSize(UInt32 Size)
{
UInt32 Entries = Convert.ToUInt32((Size * 1024) * 1024 / 17);
T = new TV[Entries];
}
}
} |