.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

How to check how much memory from .NET process is allocated in pagefile?

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
 
Hi How to check how much memory from .NET process is allocated in pagefile? I was trying use task manager and perfmon but I could not find any counter/column that would tell me how much memory from specific .NET process is in pagefile. Regards


View Complete Post


More Related Resource Links

Tools for memory error check in VS2005

  

Dear all,

I am going to write vs2005 program with ASP.NET and C++.

As you know that C++ will involve a lot of memory error handling.

Do you know is there any tools for checking memory error in Code Behind C++??


Problem while creating process memory dumps.

  
Hi, I have following piece of code: Imports System Imports System.IO Imports System.Runtime.InteropServices Imports Microsoft.Win32.SafeHandles Imports System.ComponentModel Module Module1 <Flags()> Friend Enum NativeMiniDumpType MiniDumpNormal = &H0 MiniDumpWithDataSegs = &H1 MiniDumpWithFullMemory = &H2 MiniDumpWithHandleData = &H4 MiniDumpFilterMemory = &H8 MiniDumpScanMemory = &H10 MiniDumpWithUnloadedModules = &H20 MiniDumpWithIndirectlyReferencedMemory = &H4 MiniDumpFilterModulePaths = &H80 MiniDumpWithProcessThreadData = &H100 MiniDumpWithPrivateReadWriteMemory = &H200 MiniDumpWithoutOptionalData = &H400 MiniDumpWithFullMemoryInfo = &H800 MiniDumpWithThreadInfo = &H1000 MiniDumpWithCodeSegs = &H2000 MiniDumpWithoutAuxiliaryState = &H4000 MiniDumpWithFullAuxiliaryState = &H8000 End Enum <DllImport("dbghelp.dll", CharSet:=CharSet.Auto, SetLastError:=True)> Friend Function MiniDumpWriteDump(ByVal hProcess As IntPtr, ByVal processId As Int32, ByVal hFile As SafeFileHandle, ByVal dumpType As NativeMiniDumpType, ByVal exceptionParam As IntPtr, ByVal userStreamParam As IntPtr,

Accessing memory of a remote process (x64) from application (x86) - and the other way

  
Hi everyone, My program access a remote process, e.g. to get the text of ListViewItem. It uses ReadProcessMemory, WriteProcessMemory, SendMessage, LV_ITEM via PInvoke. Below is a little codesnippet. This doesnt work, when i compile for x86 and the remote process is x64 (or the other way). I know that is because the size of IntPtr - and so of the LV_ITEM-Structure - is different. Is there any way, to access x86 and x64 remote processes from the same application?  Is there any way to find out if the remote process is x86 or x64 and make my call's with a suitable LV-Item Structure? thanks Torsten Codesnippet: LV_ITEM lvitem = new LV_ITEM(); // Allocate memory in the remote process's address space string s = string.Empty; IntPtr pszTextMemory = VirtualAllocEx(hProcess,IntPtr.Zero,  1024, (int)(AllocationType.MEM_RESERVE|AllocationType.MEM_COMMIT), (int)(AccessProtectionType.PAGE_READWRITE)); lvitem.pszText = pszTextMemory; ... IntPtr pLVItemMemory = VirtualAllocEx(hProcess, IntPtr.Zero,  Marshal.SizeOf(lvitem), (int)(AllocationType.MEM_RESERVE|AllocationType.MEM_COMMIT), (int)(AccessProtectionType.PAGE_READWRITE)); IntPtr lvItemPtr = Marshal.AllocHGlobal(Marshal.SizeOf(lvitem)); Marshal.StructureToPtr(lvitem,lvItemPtr,false); WriteProcessMemory(hProcess, pLVItemMemory, ref lvitem, Marshal.SizeOf(lvitem), ref written); SendMessage(hListView, LVM_GETITEM

Connection Error: (provider: Shared Memory Provider, error: 0 - No process is on the other end of th

  
Hello,Please bear with me as I am no Sql Server guru, but am getting this error that is preventing me from continuing with my development work.  I am the only developer on my team running Sql Server 2005 and it has been working just fine for the last week.  I opened the Management Studio this morning, just like every other morning and got this error:TITLE: Connect to Server------------------------------ Cannot connect to (local). ------------------------------ADDITIONAL INFORMATION: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233) Of course the help page says no help is available.  I have googled myself sick and still have not found a way so resolve this...has anyone else had this error and/or a fix?  I am using XP Pro SP2...any help would be greatly appreciated!Thanks!Steph

How do i force SharePoint to open file automatically during check out process?

  
Currently, when checking out a file (doc., excel, pdf etc.) in Sharepoint, i right click on doc. and click "check out". Then a window pops up and saying " you are about to check out:...." and i choose the option of saving the file in my Local Drafts Folder. The issue is that the file does not open automatically once i click "ok" in pop up window. I have go back to file in SharePoint and click on it again to open it. How do i force SharePoint to automatically open the file, when i go through the check it out process? Thank you all for your feedback.

COM Server process compiled with /clr option doesn't unload itself from memory when last COM client

  
I created Visual C++ ATL project in VS2010, exe type, imlemented COM object, then added /clr option to project. Project uses other C# dlls (WCF service). When last COM client disconnects and last COM object instance destroys, WCF service stopped, my COM server process doesn't unload itself from memory. All managed threads in C# dll are background, COM object doesn't create threads. How can I unload server process? Thank you in advance. 

Sizing a Pagefile on Servers with Large Amounts of Memory

  

I know the standard Microsoft recommendation is to make the pagefile at least 1.5 to 3 times larger then the amount of physical memory.  However, if you're talking about a server with lots of memory such as 16GB or 32GB, would following this rule be unnecessary.  With SQL 2000 running on Windows 2000 Server or Windows Server 2003 I typically see pagefile usage no more then 12% for a 2GB pagefile.  Anything over 15% means I need to look at other indicators to see if a memory bottleneck has developed.  If I have 32GB of physical memory and make the pagefile only 1.5 x 32GB I have a 48GB pagefile.  10% of this is 4.8GB, which I would hope I never see consumed.

 

Any thoughts?

 

Thanks,    Dave


check file size before uploading process in c# with asp.net

  

Hi All,

Thank you for Advance.

currently we are configured execution Timeout="1200" (The default is 110 seconds)  and maxRequestLength="12288"  (The default is 4096 KB)

but some times users upload files above 12MB so we are getting "Maximum request length exceeded" error.

we are checking the file size using client side javascript ActiveXObject object. but ActiveXObject only works in IE not in others like mozilla,crome,...

Jacescript Code are

function GetSize(file)
{
  var fso=new ActiveXObject("Scripting.FileSystemObject");
  var f=fso.getFile(file);
  return fso.getFile(file).size;
}


 

how can i check the file size before uploading process with support all the browser.

any posiblities for checking file size before server side script/object?

 


How can you check how much heap memory your objects are using?

  

Is there a way to check how much heap memory your objects are using??  (during debug mode of course) .  I am using Visual Studio 2005 with C# ASP.net.


Secondly, is there a way to check how much memory session variables are using as well?


thanks


How to derive actual physical memory consumption by a process?

  

Hello,

I am doing performance analysis of SSRS reports (2008).

Before doing anything, I check in Task Manager(Performance tab) and see that my overall physical memory which is 8GB, is already divided between available memory and system cache. I have also setup perfmon counters and logging data for available memory counter.

Now when I launch a huge report with 2 million records, it starts consuming the available memory and I notice in Task Manager(Performance tab) the available memory is reducing BUT I also notice that the system cache is also reducing (I assume that perhaps OS is borrowing memory from system cache to put it in available memory?) If my assumption is correct, then I would not be able to calculate how much physical memory my report used because it also includes a portion of system cache(?)

OR is the system cache reducing due to disk I/O?

This is getting confusing for me, please help me out experts.

Regards.

 

 


Memory error: Allocation failure : Not enough storage is available to process this command. .

  

Hi,

I get the error message above. Cube has 3 measure groups, 1 main fact and 2 many to many facts. Main fact has 450k rows, other two have 165 rows and 2200k rows. It also has 4 dimensions. Dimensions have max 10000 rows.

I get the errors when I add a "calculated" fact to the the main fact group, which is a distinct count on a key. When I remove that fact, the error is gone.

I am using sql 2005 enterprise with the latest sp's and patche on a windows 2003 server with 4GB 32 bit. Any ideas ?

Constantijn


How to derive actual physical memory consumption by a process?

  

Hello,

I am doing performance analysis of SSRS reports (2008).

Before doing anything, I check in Task Manager(Performance tab) and see that my overall physical memory which is 8GB, is already divided between available memory and system cache. I have also setup perfmon counters and logging data for available memory counter.

Now when I launch a huge report with 2 million records, it starts consuming the available memory and I notice in Task Manager(Performance tab) the available memory is reducing BUT I also notice that the system cache is also reducing (I assume that perhaps OS is borrowing memory from system cache to put it in available memory?) If my assumption is correct, then I would not be able to calculate how much physical memory my report used because it also includes a portion of system cache(?)

OR is the system cache reducing due to disk I/O?

This is getting confusing for me, please help me out experts.

Regards.

 

 


PInvoke: When is the memory allocated by the CLR marshaller freed?

  

I am using PInvoke to pass the following class to unmanaged C++ when the app starts up. All the values are passed in correctly as I step through the code. Inside the called C++ method I save a the ptr to the passed in struct.

  [StructLayout(LayoutKind.Sequential)]
    public class Config
    {
        public int Speed;

        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.LPStr, SizeConst = 2)]   
        public string[] Settings = new string[2];
    }

 

Matching C++ struct

struct config 
{
    int            Speed;
    char*        Settings[2];

  }

 

This is the method in C++ that saves ptr to the class that is passed in

Config *m_config;

void SetConfig(Config *config)

{

    m_config = config;

}

Question: if the marshaller allocated memory for the C++ struct at the time of marshaling when does it free the memory?

If I save the ptr to the passed in struct, will t

How to find out how memory is allocated in SQL Server 2005/2008?

  

I want to find out how to get memory information from SQL Server using DMVs that will equal to or be very close to the memory shown in Mem Usage column of Windows Task Manager for sqlservr.exe.   I have tried to sum single_pages_kb, multi_pages_kb, and virtual_memory_committed_kb from sys.dm_os_memory_clerks but the combined total is still less than the Mem Usage from Windows Task Manager.  


Using a CompareValidator to check input is a valid date

  
The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

Check All with JQuery and a Asp.Net GridView

  
Display a Grid on the screen with a checkbox in each row. At the bottom of the page have "Check All" button.

Typically if I need to do anything interesting I use a template column. So my GridView will look like the one below (most other columns removed for readability). The only interesting point to note is the CssClass="ApprovalCheckBox" in the CheckBox ItemTemplate.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend