summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/package.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-08-19 14:50:43 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-06-08 18:30:23 +0200
commit8492ceb405c0aa17d47ba55e48ac8891f4a582d6 (patch)
treeca236afb58cb30761112b772158082d0035ca143 /crawl-ref/source/package.h
parentbb8cc240470638dd85c4e5709df77b4aa4e3deeb (diff)
downloadcrawl-ref-8492ceb405c0aa17d47ba55e48ac8891f4a582d6.tar.gz
crawl-ref-8492ceb405c0aa17d47ba55e48ac8891f4a582d6.zip
Try to fight fragmentation by choosing the best-fitting block.
Unlike my attempt a year ago, this version actually tries a block that fits, rather than one that's just below what we need, so a tiny new fragment is created in most cases, making things worse :p
Diffstat (limited to 'crawl-ref/source/package.h')
-rw-r--r--crawl-ref/source/package.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/package.h b/crawl-ref/source/package.h
index 3c8812e713..2cc6d8fae2 100644
--- a/crawl-ref/source/package.h
+++ b/crawl-ref/source/package.h
@@ -93,7 +93,7 @@ private:
std::stack<len_t> unlinked_blocks;
std::map<len_t, std::pair<len_t, len_t> > block_map;
len_t extend_block(len_t at, len_t size, len_t by);
- len_t alloc_block();
+ len_t alloc_block(len_t &size);
void finish_chunk(const std::string name, len_t at);
void free_chunk(const std::string name);
len_t write_directory();