* Initial work on a global chunk manager for controlling memory usage,

and checking if enough disk space is available for MS_ASYNC to be safe.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@743 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-07-19 00:42:23 +00:00
parent e8a8fc7e1a
commit b3fc488e5f
7 changed files with 32 additions and 21 deletions
+1
View File
@@ -51,6 +51,7 @@ public:
static const int e_deadlk = EDEADLK;
static const int e_noent = ENOENT;
static const int e_nomem = ENOMEM;
static const int e_notdir = ENOTDIR;
static const int e_intr = EINTR;
+2 -2
View File
@@ -71,9 +71,9 @@ public:
bool update(const char* fn) { return FS_STAT_FN; }
bool update(const std::string& filename) { return update(filename.c_str()); }
blocksize_type blocksize() { return m_stat.f_bsize; }
blocksize_type blocksize() { return FS_STAT_BLOCK_SIZE; }
blockcount_type blocks_avail() { return m_stat.f_bavail; }
int64_t bytes_avail() { return (int64_t) m_stat.f_bsize * m_stat.f_bavail; }
int64_t bytes_avail() { return (int64_t) blocksize() * m_stat.f_bavail; }
private:
fs_stat_type m_stat;