os/kernelhwsrv/kerneltest/e32test/pccd/t_pccdbm.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32test\pccd\t_pccdbm.cpp
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
#include "../mmu/d_sharedchunk.h"
sl@0
    18
#include <hal.h>
sl@0
    19
#include <e32test.h>
sl@0
    20
#include <e32svr.h>
sl@0
    21
#include <e32hal.h>
sl@0
    22
#include <e32uid.h>
sl@0
    23
sl@0
    24
const TInt K1K = 1024;
sl@0
    25
const TInt K4K = 4096;
sl@0
    26
const TInt K1MB = K1K*K1K;
sl@0
    27
const TInt KMaxTestSize = K1MB;     // Redefine to increase test length
sl@0
    28
const TInt KVeryLongRdWrBufLen=((KMaxTestSize*2)+K4K);	// Double Max Test size + 4K
sl@0
    29
sl@0
    30
LOCAL_D TPtr8 DataBuf(NULL, KVeryLongRdWrBufLen,KVeryLongRdWrBufLen);
sl@0
    31
LOCAL_D HBufC8* wrBufH = NULL;
sl@0
    32
sl@0
    33
LOCAL_D TInt DriveNumber;
sl@0
    34
LOCAL_D TBusLocalDrive TheDrive;
sl@0
    35
LOCAL_D TBool IsReadOnly;
sl@0
    36
sl@0
    37
LOCAL_D RSharedChunkLdd Ldd;
sl@0
    38
LOCAL_D RChunk TheChunk;
sl@0
    39
const TUint ChunkSize = KVeryLongRdWrBufLen;
sl@0
    40
sl@0
    41
const TTimeIntervalMicroSeconds32 KFloatingPointTestTime = 10000000;	// 10 seconds
sl@0
    42
LOCAL_D TInt gFastCounterFreq;
sl@0
    43
LOCAL_D TBool ChangeFlag;
sl@0
    44
sl@0
    45
RTest test(_L("Local Drive BenchMark Test"));
sl@0
    46
sl@0
    47
///// Buffer Allocation
sl@0
    48
void AllocateBuffers()
sl@0
    49
	{
sl@0
    50
	test.Next(_L("Allocate Buffers"));
sl@0
    51
sl@0
    52
	wrBufH = HBufC8::New(KVeryLongRdWrBufLen);
sl@0
    53
	test(wrBufH != NULL);
sl@0
    54
	}
sl@0
    55
	
sl@0
    56
void AllocateSharedBuffers(TBool Fragmented, TBool Caching)
sl@0
    57
	{
sl@0
    58
	// Setup SharedMemory Buffers
sl@0
    59
	test.Next(_L("Allocate Shared Memory\n"));
sl@0
    60
	
sl@0
    61
	RLoader l;
sl@0
    62
	test(l.Connect()==KErrNone);
sl@0
    63
	test(l.CancelLazyDllUnload()==KErrNone);
sl@0
    64
	l.Close();
sl@0
    65
sl@0
    66
	test.Printf(_L("Initialise\n"));
sl@0
    67
	TInt PageSize = 0;
sl@0
    68
	TInt r = UserHal::PageSizeInBytes(PageSize);
sl@0
    69
	test(r==KErrNone);
sl@0
    70
sl@0
    71
	test.Printf(_L("Loading test driver\n"));
sl@0
    72
	r = User::LoadLogicalDevice(KSharedChunkLddName);
sl@0
    73
	test(r==KErrNone || r==KErrAlreadyExists);
sl@0
    74
sl@0
    75
	test.Printf(_L("Opening channel\n"));
sl@0
    76
	r = Ldd.Open();
sl@0
    77
	test(r==KErrNone);
sl@0
    78
sl@0
    79
	test.Printf(_L("Create chunk\n"));
sl@0
    80
	
sl@0
    81
	TUint aCreateFlags = EMultiple|EOwnsMemory;
sl@0
    82
	
sl@0
    83
	if (Caching)
sl@0
    84
		{
sl@0
    85
		test.Printf(_L("Chunk Type:Caching\n"));
sl@0
    86
		aCreateFlags |= ECached;
sl@0
    87
		}
sl@0
    88
	else
sl@0
    89
		test.Printf(_L("Chunk Type:Fully Blocking\n"));
sl@0
    90
	
sl@0
    91
    TCommitType aCommitType = EContiguous;
sl@0
    92
      
sl@0
    93
    TUint TotalChunkSize = ChunkSize;  // rounded to nearest Page Size
sl@0
    94
    
sl@0
    95
	TUint ChunkAttribs = TotalChunkSize|aCreateFlags;	
sl@0
    96
	r = Ldd.CreateChunk(ChunkAttribs);
sl@0
    97
	test(r==KErrNone);
sl@0
    98
sl@0
    99
	if(Fragmented)
sl@0
   100
		{
sl@0
   101
		test.Printf(_L("Commit Fragmented Memory\n"));
sl@0
   102
			
sl@0
   103
		// Allocate Pages in reverse order to maximise memory fragmentation
sl@0
   104
		TUint i = ChunkSize;
sl@0
   105
		do
sl@0
   106
			{
sl@0
   107
			i-=PageSize;
sl@0
   108
			test.Printf(_L("Commit %d\n"), i);
sl@0
   109
			r = Ldd.CommitMemory(aCommitType|i,PageSize);
sl@0
   110
			test(r==KErrNone);
sl@0
   111
			}while (i>0);
sl@0
   112
		}
sl@0
   113
	else
sl@0
   114
		{
sl@0
   115
		test.Printf(_L("Commit Contigouos Memory\n"));
sl@0
   116
		r = Ldd.CommitMemory(aCommitType,TotalChunkSize);
sl@0
   117
		test(r==KErrNone);
sl@0
   118
		}
sl@0
   119
sl@0
   120
	test.Printf(_L("Open user handle\n"));
sl@0
   121
	r = Ldd.GetChunkHandle(TheChunk);
sl@0
   122
	test(r==KErrNone);
sl@0
   123
	
sl@0
   124
	}
sl@0
   125
sl@0
   126
void DeAllocateBuffers()
sl@0
   127
	{
sl@0
   128
	delete wrBufH;
sl@0
   129
	}
sl@0
   130
sl@0
   131
void DeAllocareSharedMemory()
sl@0
   132
	{
sl@0
   133
// destory chunk
sl@0
   134
	test.Printf(_L("Shared Memory\n"));
sl@0
   135
	test.Printf(_L("Close user chunk handle\n"));
sl@0
   136
	TheChunk.Close();
sl@0
   137
sl@0
   138
	test.Printf(_L("Close kernel chunk handle\n"));
sl@0
   139
	TInt r = Ldd.CloseChunk();  // 1==DObject::EObjectDeleted
sl@0
   140
	test(r==1);
sl@0
   141
sl@0
   142
	test.Printf(_L("Check chunk is destroyed\n"));
sl@0
   143
	r = Ldd.IsDestroyed();
sl@0
   144
	test(r==1);
sl@0
   145
        
sl@0
   146
	test.Printf(_L("Close test driver\n"));
sl@0
   147
	Ldd.Close();
sl@0
   148
	}
sl@0
   149
sl@0
   150
// end Buffer allocation
sl@0
   151
sl@0
   152
sl@0
   153
LOCAL_C void FillRegion(TInt aBlockSize)
sl@0
   154
/**
sl@0
   155
 * Fill media starting at pos 0, 
sl@0
   156
 * with a pattern of 2*aBlockSize in length
sl@0
   157
 */
sl@0
   158
	{
sl@0
   159
	test.Printf(_L("Fill Region with Data!\n"));
sl@0
   160
	DataBuf.SetLength(aBlockSize);
sl@0
   161
		
sl@0
   162
	//fill up buffer
sl@0
   163
	for (TInt i=0;i<(aBlockSize);i++)
sl@0
   164
		{
sl@0
   165
		DataBuf[i]=(TUint8)(0xFF-i);
sl@0
   166
		}
sl@0
   167
	
sl@0
   168
	TInt r = TheDrive.Write(0, DataBuf);
sl@0
   169
	test (r == KErrNone);
sl@0
   170
	}
sl@0
   171
sl@0
   172
LOCAL_C void DoTestRead(TInt aBlockSize)
sl@0
   173
// 
sl@0
   174
// Multiple Read operations of aBlockSize are performed for 10 seconds.
sl@0
   175
// Average is then displayed.
sl@0
   176
//
sl@0
   177
	{
sl@0
   178
	DataBuf.SetLength(aBlockSize);
sl@0
   179
	
sl@0
   180
	TUint functionCalls = 0;
sl@0
   181
	TUint initTicks = 0;
sl@0
   182
	TUint finalTicks = 0;
sl@0
   183
sl@0
   184
	RTimer timer;
sl@0
   185
	timer.CreateLocal();
sl@0
   186
	TRequestStatus reqStat;
sl@0
   187
sl@0
   188
	TInt pos = 0;
sl@0
   189
sl@0
   190
	timer.After(reqStat, KFloatingPointTestTime);
sl@0
   191
	initTicks = User::FastCounter();
sl@0
   192
	
sl@0
   193
	for (TInt i = 0; reqStat==KRequestPending; i++)
sl@0
   194
		{
sl@0
   195
		TInt r = TheDrive.Read(pos, aBlockSize, DataBuf);
sl@0
   196
		
sl@0
   197
		test (r == KErrNone);
sl@0
   198
		
sl@0
   199
		pos += aBlockSize;
sl@0
   200
		if (pos > KVeryLongRdWrBufLen-aBlockSize)
sl@0
   201
			pos = 0;
sl@0
   202
sl@0
   203
		functionCalls++;
sl@0
   204
		}
sl@0
   205
sl@0
   206
	finalTicks = User::FastCounter();
sl@0
   207
	timer.Close();
sl@0
   208
	
sl@0
   209
	TTimeIntervalMicroSeconds duration = TInt64(finalTicks - initTicks) * TInt64(1000000) / TInt64(gFastCounterFreq) ;
sl@0
   210
sl@0
   211
	TInt dataTransferred = functionCalls * aBlockSize;
sl@0
   212
	TReal transferRate =  TReal32(dataTransferred) / 
sl@0
   213
						 TReal(duration.Int64()) * TReal(1000000) / TReal(K1K); // KB/s
sl@0
   214
		
sl@0
   215
	test.Printf(_L("Read  %7d bytes in %7d byte blocks:\t%11.3f KBytes/s\n"), 
sl@0
   216
				    dataTransferred, aBlockSize, transferRate);
sl@0
   217
sl@0
   218
	return;
sl@0
   219
	}	
sl@0
   220
sl@0
   221
sl@0
   222
LOCAL_C void TestRead()
sl@0
   223
/**
sl@0
   224
 * Repeat read test for values between 1Byte and KMaxTestSize, in steps of power of 2
sl@0
   225
 */
sl@0
   226
	{
sl@0
   227
	FillRegion(KVeryLongRdWrBufLen);
sl@0
   228
	
sl@0
   229
	for (TInt i = 1; i<=KMaxTestSize; i*=2)
sl@0
   230
		{
sl@0
   231
		DoTestRead(i);
sl@0
   232
		}
sl@0
   233
	}
sl@0
   234
sl@0
   235
LOCAL_C void DoTestWrite(TInt aBlockSize)
sl@0
   236
// 
sl@0
   237
// Multiple Write operations of aBlockSize are performed for 10 seconds.
sl@0
   238
// Average is then displayed.
sl@0
   239
//
sl@0
   240
	{
sl@0
   241
	DataBuf.SetLength(aBlockSize);
sl@0
   242
	
sl@0
   243
	//fill up buffer
sl@0
   244
	for (TInt i=0;i<aBlockSize;i++)
sl@0
   245
		{
sl@0
   246
		DataBuf[i]=(TUint8)(0xFF-i);
sl@0
   247
		}
sl@0
   248
	
sl@0
   249
	TUint functionCalls = 0;
sl@0
   250
	TUint initTicks = 0;
sl@0
   251
	TUint finalTicks = 0;
sl@0
   252
sl@0
   253
	RTimer timer;
sl@0
   254
	timer.CreateLocal();
sl@0
   255
	TRequestStatus reqStat;
sl@0
   256
sl@0
   257
	TInt pos = 0;
sl@0
   258
sl@0
   259
	timer.After(reqStat, KFloatingPointTestTime);
sl@0
   260
	initTicks = User::FastCounter();
sl@0
   261
	
sl@0
   262
	for (TInt j = 0; reqStat==KRequestPending; j++)
sl@0
   263
		{
sl@0
   264
		TInt r = TheDrive.Write(pos, DataBuf);
sl@0
   265
		
sl@0
   266
		test (r == KErrNone);
sl@0
   267
		
sl@0
   268
		pos += aBlockSize;
sl@0
   269
		if (pos > KVeryLongRdWrBufLen-aBlockSize)
sl@0
   270
			pos = 0;
sl@0
   271
sl@0
   272
		functionCalls++;
sl@0
   273
		}
sl@0
   274
sl@0
   275
	finalTicks = User::FastCounter();
sl@0
   276
	timer.Close();
sl@0
   277
	
sl@0
   278
	TTimeIntervalMicroSeconds duration = TInt64(finalTicks - initTicks) * TInt64(1000000) / TInt64(gFastCounterFreq) ;
sl@0
   279
sl@0
   280
	TInt dataTransferred = functionCalls * aBlockSize;
sl@0
   281
	TReal transferRate =  TReal32(dataTransferred) / 
sl@0
   282
						 TReal(duration.Int64()) * TReal(1000000) / TReal(K1K); // KB/s
sl@0
   283
		
sl@0
   284
	test.Printf(_L("Write %7d bytes in %7d byte blocks:\t%11.3f KBytes/s\n"), 
sl@0
   285
				    dataTransferred, aBlockSize, transferRate);
sl@0
   286
sl@0
   287
	return;
sl@0
   288
	}	
sl@0
   289
sl@0
   290
LOCAL_C void TestWrite()
sl@0
   291
/**
sl@0
   292
 * Repeat write test for values between 1Byte and KMaxTestSize, in steps of power of 2
sl@0
   293
 */
sl@0
   294
	{
sl@0
   295
	for (TInt i = 1; i<=KMaxTestSize; i*=2)
sl@0
   296
		{
sl@0
   297
		DoTestWrite(i);
sl@0
   298
		}
sl@0
   299
	}
sl@0
   300
sl@0
   301
TBool TestDriveInfo()
sl@0
   302
	{
sl@0
   303
	test.Next( _L("Test drive info") );
sl@0
   304
	
sl@0
   305
	TLocalDriveCapsV6Buf DriveCaps;
sl@0
   306
	TheDrive.Caps( DriveCaps );
sl@0
   307
sl@0
   308
	test.Printf( _L("Caps V1:\n\tiSize=0x%lx\n\tiType=%d\n\tiConnectionBusType=%d\n\tiDriveAtt=0x%x\n\tiMediaAtt=0x%x\n\tiBaseAddress=0x%x\n\tiFileSystemId=0x%x\n\tiPartitionType=0x%x\n"),
sl@0
   309
			DriveCaps().iSize,
sl@0
   310
			DriveCaps().iType,
sl@0
   311
			DriveCaps().iConnectionBusType,
sl@0
   312
			DriveCaps().iDriveAtt,
sl@0
   313
			DriveCaps().iMediaAtt,
sl@0
   314
			DriveCaps().iBaseAddress,
sl@0
   315
			DriveCaps().iFileSystemId,
sl@0
   316
			DriveCaps().iPartitionType );
sl@0
   317
sl@0
   318
	test.Printf( _L("Caps V2:\n\tiHiddenSectors=0x%x\n\tiEraseBlockSize=0x%x\nCaps V3:\n\tiExtraInfo=%x\n\tiMaxBytesPerFormat=0x%x\n"),
sl@0
   319
			DriveCaps().iHiddenSectors,
sl@0
   320
			DriveCaps().iEraseBlockSize, 
sl@0
   321
			DriveCaps().iExtraInfo,
sl@0
   322
			DriveCaps().iMaxBytesPerFormat );
sl@0
   323
sl@0
   324
	test.Printf( _L("Format info:\n\tiCapacity=0x%lx\n\tiSectorsPerCluster=0x%x\n\tiSectorsPerTrack=0x%x\n\tiNumberOfSides=0x%x\n\tiFatBits=%d\n"),
sl@0
   325
			DriveCaps().iFormatInfo.iCapacity,
sl@0
   326
			DriveCaps().iFormatInfo.iSectorsPerCluster,
sl@0
   327
			DriveCaps().iFormatInfo.iSectorsPerTrack,
sl@0
   328
			DriveCaps().iFormatInfo.iNumberOfSides,
sl@0
   329
			DriveCaps().iFormatInfo.iFATBits );
sl@0
   330
sl@0
   331
	test.Printf( _L("Caps V4:\n"));
sl@0
   332
	test.Printf(_L("\tiNumberOfSectors: %d\r\n"),DriveCaps().iNumberOfSectors);
sl@0
   333
	test.Printf(_L("\tiNumPagesPerBlock: %d\r\n"),DriveCaps().iNumPagesPerBlock);
sl@0
   334
	test.Printf(_L("\tiSectorSizeInBytes: %d\r\n"),DriveCaps().iSectorSizeInBytes);
sl@0
   335
	test.Printf(_L("\tiNumBytesSpare: %d\r\n"),DriveCaps().iNumBytesSpare);
sl@0
   336
	test.Printf(_L("\tiEffectiveBlks: %d\r\n"),DriveCaps().iEffectiveBlks);
sl@0
   337
	test.Printf(_L("\tiStartPage: %d\r\n"),DriveCaps().iStartPage);
sl@0
   338
	test.Printf(_L("\tMediaSizeInBytes: %ld\r\n"),DriveCaps().MediaSizeInBytes());
sl@0
   339
	
sl@0
   340
	test.Printf( _L("Caps V5:\n"));
sl@0
   341
	if(DriveCaps().iSerialNumLength > 0)
sl@0
   342
		{
sl@0
   343
        test.Printf( _L("\tiSerialNum : ") );
sl@0
   344
        TBuf8<2*KMaxSerialNumLength> snBuf;
sl@0
   345
        TUint i;
sl@0
   346
		for (i=0; i<DriveCaps().iSerialNumLength; i++)
sl@0
   347
			{
sl@0
   348
            snBuf.AppendNumFixedWidth( DriveCaps().iSerialNum[i], EHex, 2 );
sl@0
   349
			test.Printf( _L("%02x"), DriveCaps().iSerialNum[i]);
sl@0
   350
			}
sl@0
   351
		test.Printf( _L("\n") );
sl@0
   352
		}
sl@0
   353
	else
sl@0
   354
		{
sl@0
   355
		test.Printf( _L("\tiSerialNum : Not Supported") );
sl@0
   356
		}
sl@0
   357
	
sl@0
   358
	test.Printf(_L("Caps V6:\n"));
sl@0
   359
	test.Printf(_L("\tiBlockSize: %d\r\n"),DriveCaps().iBlockSize);
sl@0
   360
	
sl@0
   361
	TBool isReadOnly = DriveCaps().iMediaAtt & KMediaAttWriteProtected;
sl@0
   362
	return(isReadOnly);
sl@0
   363
	}
sl@0
   364
sl@0
   365
sl@0
   366
sl@0
   367
void ParseCommandLineArgs()
sl@0
   368
	{
sl@0
   369
	TBuf<0x100> buf;
sl@0
   370
	
sl@0
   371
	TChar driveToTest;
sl@0
   372
sl@0
   373
	// Get the list of drives
sl@0
   374
	TDriveInfoV1Buf diBuf;
sl@0
   375
	UserHal::DriveInfo(diBuf);
sl@0
   376
	TDriveInfoV1 &di=diBuf();
sl@0
   377
	TInt driveCount = di.iTotalSupportedDrives;
sl@0
   378
sl@0
   379
	// Parse command line arguments for the drive to test
sl@0
   380
	User::CommandLine(buf);
sl@0
   381
	TLex lex(buf);
sl@0
   382
	TPtrC token=lex.NextToken();
sl@0
   383
	TFileName thisfile=RProcess().FileName();
sl@0
   384
	if (token.MatchF(thisfile)==0)
sl@0
   385
		{
sl@0
   386
		token.Set(lex.NextToken());
sl@0
   387
		}
sl@0
   388
sl@0
   389
	if(token.Length()!=0)
sl@0
   390
		{
sl@0
   391
		driveToTest=token[0];
sl@0
   392
		}
sl@0
   393
	else
sl@0
   394
		{		
sl@0
   395
		//Print the list of usable drives
sl@0
   396
		test.Printf(_L("\nDRIVES USED AT PRESENT :\r\n"));
sl@0
   397
sl@0
   398
		for (TInt i=0; i < driveCount; i++)
sl@0
   399
			{
sl@0
   400
			TBool flag=EFalse;
sl@0
   401
			RLocalDrive d;
sl@0
   402
			TInt r=d.Connect(i,flag);
sl@0
   403
			//Not all the drives are used at present
sl@0
   404
			if (r == KErrNotSupported)
sl@0
   405
				continue;
sl@0
   406
sl@0
   407
			test.Printf(_L("%d : DRIVE NAME  :%- 16S\r\n"), i, &di.iDriveName[i]);
sl@0
   408
			}	
sl@0
   409
		
sl@0
   410
		test.Printf(_L("\r\nWarning - all data on drive will be lost.\r\n"));
sl@0
   411
		test.Printf(_L("<<<Hit drive number to continue>>>\r\n"));
sl@0
   412
sl@0
   413
		driveToTest=(TUint)test.Getch();
sl@0
   414
		}
sl@0
   415
sl@0
   416
	DriveNumber=((TUint)driveToTest) - '0';
sl@0
   417
	test(DriveNumber >= 1 && DriveNumber < di.iTotalSupportedDrives);
sl@0
   418
	}
sl@0
   419
sl@0
   420
GLDEF_C TInt E32Main()
sl@0
   421
    {
sl@0
   422
	test.Title();
sl@0
   423
	test.Start(_L("Benchmark Testing for Local Media Drivers"));
sl@0
   424
	
sl@0
   425
	ParseCommandLineArgs();
sl@0
   426
	
sl@0
   427
	AllocateBuffers();
sl@0
   428
	
sl@0
   429
	test.Printf(_L("Connect to local drive (%d)\n"),DriveNumber);
sl@0
   430
sl@0
   431
	ChangeFlag=EFalse;
sl@0
   432
	test(TheDrive.Connect(DriveNumber,ChangeFlag)==KErrNone);
sl@0
   433
	
sl@0
   434
	TInt r = HAL::Get(HAL::EFastCounterFrequency, gFastCounterFreq);	
sl@0
   435
	test(r == KErrNone);
sl@0
   436
sl@0
   437
	IsReadOnly = TestDriveInfo();
sl@0
   438
	
sl@0
   439
	if (IsReadOnly)
sl@0
   440
		{
sl@0
   441
		test.Printf(_L("Drive is read only - can't run test!!\n"));
sl@0
   442
		DeAllocateBuffers();
sl@0
   443
	    test.End();
sl@0
   444
		return(0);
sl@0
   445
		}
sl@0
   446
	
sl@0
   447
// Heap Memory 	
sl@0
   448
	DataBuf.Set(wrBufH->Des());
sl@0
   449
	test.Next(_L("Read Benchmark - Heap Memory"));
sl@0
   450
	TestRead();
sl@0
   451
	test.Next(_L("Write Benchmark - Heap Memory"));
sl@0
   452
	TestWrite();
sl@0
   453
	DeAllocateBuffers();
sl@0
   454
	
sl@0
   455
// Contiguous Shared Chunk	
sl@0
   456
	AllocateSharedBuffers(EFalse, EFalse);
sl@0
   457
	DataBuf.Set(TheChunk.Base(),KVeryLongRdWrBufLen, KVeryLongRdWrBufLen);
sl@0
   458
	test.Next(_L("Read Benchmark - Shared Contiguous Memory"));
sl@0
   459
	TestRead();
sl@0
   460
	test.Next(_L("Write Benchmark - Shared Contiguous Memory"));
sl@0
   461
	TestWrite();
sl@0
   462
	DeAllocareSharedMemory();
sl@0
   463
sl@0
   464
// Fragmented Shared Chunk	
sl@0
   465
	AllocateSharedBuffers(ETrue, EFalse);
sl@0
   466
	DataBuf.Set(TheChunk.Base(),KVeryLongRdWrBufLen, KVeryLongRdWrBufLen);
sl@0
   467
	test.Next(_L("Read Benchmark - Shared Fragmented Memory"));
sl@0
   468
	TestRead();
sl@0
   469
	test.Next(_L("Write Benchmark - Shared Fragmented Memory"));
sl@0
   470
	TestWrite();
sl@0
   471
	DeAllocareSharedMemory();	
sl@0
   472
	
sl@0
   473
    test.End();
sl@0
   474
sl@0
   475
	return(0);
sl@0
   476
	}
sl@0
   477