mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 14:46:02 +00:00
Backed out changeset e72707266b4a because of orange on Win Debug. a=backout
This commit is contained in:
parent
9a20d36be1
commit
16ec37d275
3
netwerk/cache/nsDiskCacheMap.h
vendored
3
netwerk/cache/nsDiskCacheMap.h
vendored
@ -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:
|
||||
|
5
netwerk/cache/nsDiskCacheStreams.cpp
vendored
5
netwerk/cache/nsDiskCacheStreams.cpp
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user