kerneltest/e32test/cppexceptions/t_unmap.cpp
changeset 293 0659d0e1a03c
parent 0 a41df078684a
equal deleted inserted replaced
291:206a6eaaeb71 293:0659d0e1a03c
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   138 
   138 
   139 static const TInt KHeapSize = 0x2000;
   139 static const TInt KHeapSize = 0x2000;
   140 
   140 
   141 TInt E32Main()
   141 TInt E32Main()
   142    	{
   142    	{
   143 	// Turn off lazy dll unloading
   143 	COMPLETE_POST_BOOT_SYSTEM_TASKS();
   144 	RLoader l;
   144 
   145 	test(l.Connect()==KErrNone);
       
   146 	test(l.CancelLazyDllUnload()==KErrNone);
       
   147 	l.Close();
       
   148 	
       
   149 	test.Start(_L("Check code seg unmapping over User::Leave()/C++ exceptions."));
   145 	test.Start(_L("Check code seg unmapping over User::Leave()/C++ exceptions."));
   150 
   146 
   151 	__UHEAP_MARK;
   147 	__UHEAP_MARK;
   152    	//
   148    	//
   153    	CTrapCleanup* cleanup = CTrapCleanup::New();
   149    	CTrapCleanup* cleanup = CTrapCleanup::New();