Z
Ziphyre
Hi,
I have a simple windows application, it doen't have any form, or
expensive resource, just a simple exe. Its size compiled in release mode
is approximately 23KB. But when I run it, its size on memory is approx
12MB (megabyte!!!). Here is a simplified version of the code, I'll be
more than happy if you could tell me is this normal, or what can cause
the problem
Thanks
using System.Text;
using System.IO;
using System.Collections.Specialized;
using System.Web;
using System.Threading;
public class AutoBuy
{
public static void Main()
{
while ( true )
{
CommTest.GetData();
Thread.Sleep(3000000);
}
}
}
public class CommTest
{
public static void GetData()
{
//... declaration of 3 string
HttpWebRequest hreq = CreateKocGETRequest();
//mark1
HttpWebResponse hresp = (HttpWebResponse) req.GetResponse();
StreamReader respReader = new
StreamReader(hresp.GetResponseStream());
rstring = respReader.ReadToEnd();
respReader.Close();
hresp.Close();
//mark2
hreq = CreateKocPOSTRequest("login.php", ckyString,
byteArray);
//again mark1 to mark2 with different data, nothing
//special
}
public static CookieCollection GetCookies(WebHeaderCollection
hdCol)
{
//a function which extracts 3 cookies from header files
//works only with int and string's
return ckyCol;
}
public static string GetHash(string s)
{
//another function just with ints and strings
return astring;
}
public static HttpWebRequest CreateKocGETRequest()
{
HttpWebRequest KocReq = (HttpWebRequest)
WebRequest.Create("http://www.temp.com");
//sets 5 five properties
return KocReq;
}
public static HttpWebRequest CreateKocPOSTRequest(string path,
string ckyString, byte[] postData)
{
HttpWebRequest KocReq = (HttpWebRequest)
WebRequest.Create("http://www.temp.com/" +
path);
//sets 7 properties with strings
return KocReq;
}
}
I have a simple windows application, it doen't have any form, or
expensive resource, just a simple exe. Its size compiled in release mode
is approximately 23KB. But when I run it, its size on memory is approx
12MB (megabyte!!!). Here is a simplified version of the code, I'll be
more than happy if you could tell me is this normal, or what can cause
the problem
Thanks
using System.Text;
using System.IO;
using System.Collections.Specialized;
using System.Web;
using System.Threading;
public class AutoBuy
{
public static void Main()
{
while ( true )
{
CommTest.GetData();
Thread.Sleep(3000000);
}
}
}
public class CommTest
{
public static void GetData()
{
//... declaration of 3 string
HttpWebRequest hreq = CreateKocGETRequest();
//mark1
HttpWebResponse hresp = (HttpWebResponse) req.GetResponse();
StreamReader respReader = new
StreamReader(hresp.GetResponseStream());
rstring = respReader.ReadToEnd();
respReader.Close();
hresp.Close();
//mark2
hreq = CreateKocPOSTRequest("login.php", ckyString,
byteArray);
//again mark1 to mark2 with different data, nothing
//special
}
public static CookieCollection GetCookies(WebHeaderCollection
hdCol)
{
//a function which extracts 3 cookies from header files
//works only with int and string's
return ckyCol;
}
public static string GetHash(string s)
{
//another function just with ints and strings
return astring;
}
public static HttpWebRequest CreateKocGETRequest()
{
HttpWebRequest KocReq = (HttpWebRequest)
WebRequest.Create("http://www.temp.com");
//sets 5 five properties
return KocReq;
}
public static HttpWebRequest CreateKocPOSTRequest(string path,
string ckyString, byte[] postData)
{
HttpWebRequest KocReq = (HttpWebRequest)
WebRequest.Create("http://www.temp.com/" +
path);
//sets 7 properties with strings
return KocReq;
}
}