In an operating system, a Memory Mapping file are virtual storage place which has direct byte to byte correlation between the Virtual Address Space and the corresponding physical storage. So when we access the Virtual Address space via a memory mapping file we are directly communicating with the kernel space where the file is actually loaded. The portion of calculation between the physical storage and logical storage is hence avoided.
Memory Mapping files allows application to access files in the same way as memory. Generally as address between the physical storage and virtual memory address space, we cannot access the physical address directly. But using Memory Mapping Files, the process loads a specific range of address within the process address space with which the storage of memory into the file can be done by just assigning value to a dereferenced pointers. The IO operation on a MemoryMapping file is so fast that from the programmers point of view it seems to be like accessing the memory rather than actual physical storage. To increase performance memory mapping files are not actually stored to the disk file as well, but rather it will be stored automatically in background when FlushViewOfFile is executed or paging file is written. To Read more about memory mapping files, read here.
Memory Mapping file inside .NET Framework
.NET introduces a separate namespace to handle Memory Mapping files. Previously, we needed to do this using unmanaged Api's but with the introduction of managed API into the .NET framework library, it becomes very easy to handle MemoryMapping file directly from .NET library.
As memory mapping files are loaded into memory on a separate range of address space, two process can easily share the same page file instance and thus interprocess communication can be made with fast access to memory. It is recommended to back data with an actual disk file when large data is loaded into memory, so that there is no memory leak on the system when there is large memory pressure.
Handy Tricks and Tips to do your .NET code Fast, Efficient and Simple. Some common questions that comes into mind. Please check if you could find them listed or not.
Monday, February 27, 2012
Saturday, February 4, 2012
Optimizing INPC Objects against memory leaks using WeakEvents
Working with WPF has always been a fun. Dealing with animation and richness in UI to its optimum level often gives you an edge to present something to your client and to ensure that your client shouts with a "WOW!". The Wow factor of applications can give you high rank in the first place, but increases expectation from the software. It is practically very hard to maintain with this expectation as time progresses. The survival of the fittest chooses one which best suits to the problem.
One of the major problems that developers face today is the memory leaks in an applications. Often the software that is built looks great but does not follow basic guidelines to ensure that the application is not memory hungry or even there are no existing memory leaks.
Note : By memory leak we mean, some portion of memory is not reclaimed by the garbage collector even though the object is not in use.
By this way, the memory usage of the application increases at a certain extent and finally crashes with the OutOfMemoryException. To detect a memory leak there exists a large number of tools of which some are free while others are used as commercial purposes. Most of these problems can be fixed by either using Disposable pattern ( IDisposable interface) or manually de - referencing each and every object that are not in use. Sometimes, this can be also done in destructor / finalizers in .net too (but remember using destructors lose GC cycle).
One of the major problems that developers face today is the memory leaks in an applications. Often the software that is built looks great but does not follow basic guidelines to ensure that the application is not memory hungry or even there are no existing memory leaks.
Note : By memory leak we mean, some portion of memory is not reclaimed by the garbage collector even though the object is not in use.
By this way, the memory usage of the application increases at a certain extent and finally crashes with the OutOfMemoryException. To detect a memory leak there exists a large number of tools of which some are free while others are used as commercial purposes. Most of these problems can be fixed by either using Disposable pattern ( IDisposable interface) or manually de - referencing each and every object that are not in use. Sometimes, this can be also done in destructor / finalizers in .net too (but remember using destructors lose GC cycle).
Wednesday, January 4, 2012
I am reviewing Microsoft's 70-515 C# exam PrepKit from UCertify
I have got a offer from uCertify to review their PrepKit and I have accepted that challenge and now I am reviewing 70-515 Exam .NET 4.0 PrepKit from uCertify. Initially it looks like a simple tool that has a number of practice sets listed on the initial screen to try out few tests. The home screen also contains few links that points to Study Materials related to the exam that you are registered for. Lets take a look how the initial screen looks like :
The menu contains different links to Tests, Quiz, Notes, Articles, Reports etc for easy navigation.
As soon as I am done with the full review I will post it for you all.
If you are looking for a Certification, you can buy it from them :
http://www.ucertify.com/
Thanks and stay tune.
Monday, January 2, 2012
Awarded Microsoft MVP in a row
Its new years eve. I was struck in traffic to join a Birthday party of one of my friend. Its all of a sudden I realized that it is my MVP renewal date too. I forgot it totally.
I opened my Mobile, browsed to my account and saw, I have got a mail from MVP Award Team.
"Dear Abhishek Sur,
Congratulations! We are pleased to present you with the 2012 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in Client App Dev technical communities during the past year.
The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership."
Nestor Portillo
Director
Community & Online Support"
I am really passionate about this award and I am really happy to receive this award for yet another time in Client App Dev category. This came to me as a New Years Gift. Thank you so much Microsoft for considering my activities and I want to personally thank Mr. Abhishek Kant, as my MVP Lead, Abhijit Jana, Kunal Chowdhury, Amit Bansal, Dhananjay Kumar, Pinal Dave, Anoop Madhusudanan and last but not the least my own Community KolkataGeeks all of whom inspired me so much on my community activities. I would also like to thank the whole Microsoft Team for providing us such an opportunity to be in touch with this elite group.
And finally thank you to all my blog readers. I feel truly honored to receive such an award.
Happy New Year to all of you. Its time to party..... .
:)
I opened my Mobile, browsed to my account and saw, I have got a mail from MVP Award Team.
"Dear Abhishek Sur,
Congratulations! We are pleased to present you with the 2012 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in Client App Dev technical communities during the past year.
The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership."
Nestor Portillo
Director
Community & Online Support"
And finally thank you to all my blog readers. I feel truly honored to receive such an award.
Happy New Year to all of you. Its time to party..... .
:)
Tuesday, December 27, 2011
Daily DotNet Tips 1 year and onwards
Friends,
We are excited to celebrate 1st Anniversary of our site DailyDotnetTips today. It aims to share useful programming tips for .net developers.This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET.
Here is some of the statistics :
We are excited to celebrate 1st Anniversary of our site DailyDotnetTips today. It aims to share useful programming tips for .net developers.This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET.
Here is some of the statistics :
- Founded : 27th December 2010
- No of Posts : 250
- No facebook likes : 502
- No of participants : 7
- No of Twitter followers : 348
We are still a long way to go. Follow us and be a part of it.
Thursday, November 10, 2011
DEVCON – Kolkata, A New Beginning on 12th November, 2011
November 12th , we are getting together for a big event Developer Conference 2011 Organized by Microsoft User Group Kolkata (KolkataGeeks) . Developer Conference is the premier technical event for technology professionals at Kolkata interested in learning, connecting and exploring latest Microsoft technologies. This is also going to be community Launch event for Office 365. So be there and enjoy the flavor of cutting edge Microsoft technologies.
This is a full day event and you can attend this event in person at Bharatiya Bhasha Parisad 36A, Shakespeare Sarani, 4th Floor Kolkata – 700017. Overall there are 7 different sessions which primarily focused on latest Microsoft Technologies. . Check the Dev Con Web Site for more information.
I’ll be presenting on “Windows 8 Metro Style Application“. In this session I will talk about latest Windows release and how you can get best out of it through your Metro Style applications. There will be lots of demo in this session.
Check out session details and agenda from here http://kolkatageeks.com/DevCon2011.aspx . You can register for this event over here http://kolkatageeks.com/DevCon2011/Register.aspx
See you there !
Labels:
Developer Conference,
Metro,
Online Session,
Windows8
Monday, October 31, 2011
Layout adjustments Snapping and OrientationChanges in Metro Applications
If you have read my first article on Windows 8 metro styled application, you might already know about the working principle of it. I have talked about the capabilities for an application and settings which end user can configure for an application. In this post I will take a look at the basic layout structure that one needs to follow while creating an application in WinRT Metro styles so that it is best suited to perform well.
Layout is the most important part of any application. The best design for an application gets more credit and love from the users than applications that are designed bad. Metro style applications runs in full screen. Your application does not include a Title Bar, status bar or anything. Microsoft gave us some of the basic layout guidelines that one needs to follow. Lets talk about them here to make you understand how you should layout your application in Metro Applications to utilize maximum flexibility of it.
Layout is the most important part of any application. The best design for an application gets more credit and love from the users than applications that are designed bad. Metro style applications runs in full screen. Your application does not include a Title Bar, status bar or anything. Microsoft gave us some of the basic layout guidelines that one needs to follow. Lets talk about them here to make you understand how you should layout your application in Metro Applications to utilize maximum flexibility of it.
Subscribe to:
Posts (Atom)
Author's new book
Abhishek authored one of the best selling book of .NET. It covers ASP.NET, WPF, Windows 8, Threading, Memory Management, Internals, Visual Studio, HTML5, JQuery and many more...
Grab it now !!!
Grab it now !!!



