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.Collecti ons.Specialized ;
using System.Web;
using System.Threadin g;
public class AutoBuy
{
public static void Main()
{
while ( true )
{
CommTest.GetDat a();
Thread.Sleep(30 00000);
}
}
}
public class CommTest
{
public static void GetData()
{
//... declaration of 3 string
HttpWebRequest hreq = CreateKocGETReq uest();
//mark1
HttpWebResponse hresp = (HttpWebRespons e) req.GetResponse ();
StreamReader respReader = new
StreamReader(hr esp.GetResponse Stream());
rstring = respReader.Read ToEnd();
respReader.Clos e();
hresp.Close();
//mark2
hreq = CreateKocPOSTRe quest("login.ph p", ckyString,
byteArray);
//again mark1 to mark2 with different data, nothing
//special
}
public static CookieCollectio n GetCookies(WebH eaderCollection
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 CreateKocGETReq uest()
{
HttpWebRequest KocReq = (HttpWebRequest )
WebRequest.Crea te("http://www.temp.com");
//sets 5 five properties
return KocReq;
}
public static HttpWebRequest CreateKocPOSTRe quest(string path,
string ckyString, byte[] postData)
{
HttpWebRequest KocReq = (HttpWebRequest )
WebRequest.Crea te("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.Collecti ons.Specialized ;
using System.Web;
using System.Threadin g;
public class AutoBuy
{
public static void Main()
{
while ( true )
{
CommTest.GetDat a();
Thread.Sleep(30 00000);
}
}
}
public class CommTest
{
public static void GetData()
{
//... declaration of 3 string
HttpWebRequest hreq = CreateKocGETReq uest();
//mark1
HttpWebResponse hresp = (HttpWebRespons e) req.GetResponse ();
StreamReader respReader = new
StreamReader(hr esp.GetResponse Stream());
rstring = respReader.Read ToEnd();
respReader.Clos e();
hresp.Close();
//mark2
hreq = CreateKocPOSTRe quest("login.ph p", ckyString,
byteArray);
//again mark1 to mark2 with different data, nothing
//special
}
public static CookieCollectio n GetCookies(WebH eaderCollection
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 CreateKocGETReq uest()
{
HttpWebRequest KocReq = (HttpWebRequest )
WebRequest.Crea te("http://www.temp.com");
//sets 5 five properties
return KocReq;
}
public static HttpWebRequest CreateKocPOSTRe quest(string path,
string ckyString, byte[] postData)
{
HttpWebRequest KocReq = (HttpWebRequest )
WebRequest.Crea te("http://www.temp.com/" +
path);
//sets 7 properties with strings
return KocReq;
}
}
Comment