Backed out changeset e72707266b4a because of orange on Win Debug. a=backout

This commit is contained in:
Mounir Lamouri 2010-10-21 15:16:34 +02:00
parent 9a20d36be1
commit 16ec37d275
3 changed files with 0 additions and 10 deletions

View File

@ -94,9 +94,6 @@ struct nsDiskCacheEntry;
#define kMaxDataFileSize 5 * 1024 * 1024 // 5 MB (in bytes)
#define kBuckets (1 << 5) // must be a power of 2!
// preallocate up to 1MB of separate cache file
#define kPreallocateLimit 1 * 1024 * 1024
class nsDiskCacheRecord {
private:

View File

@ -43,7 +43,6 @@
#include "nsDiskCacheDevice.h"
#include "nsDiskCacheStreams.h"
#include "nsCacheService.h"
#include "mozilla/FileUtils.h"
@ -729,10 +728,6 @@ nsDiskCacheStreamIO::FlushBufferToFile()
// allocate file
rv = OpenCacheFile(PR_RDWR | PR_CREATE_FILE, &mFD);
if (NS_FAILED(rv)) return rv;
PRInt64 dataSize = mBinding->mCacheEntry->PredictedDataSize();
if (dataSize != -1)
mozilla::fallocate(mFD, PR_MIN(dataSize, kPreallocateLimit));
}
// write buffer

View File

@ -47,12 +47,10 @@
#include "nscore.h"
#include "private/pprio.h"
#include "mozilla/FileUtils.h"
#include "mozilla/FunctionTimer.h"
bool
mozilla::fallocate(PRFileDesc *aFD, PRInt64 aLength)
{
NS_TIME_FUNCTION;
#if defined(HAVE_POSIX_FALLOCATE)
return posix_fallocate(PR_FileDesc2NativeHandle(aFD), 0, aLength) == 0;
#elif defined(XP_WIN)