summaryrefslogtreecommitdiff
path: root/lib/block_allocator.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-12-01 13:55:48 -0800
committerJosh Blum2012-12-01 13:55:48 -0800
commita1449c97eefa1635680ede98f61ab3538c56eb21 (patch)
tree64879533cb17caad2e6cab085a5fba0ef6abfe06 /lib/block_allocator.cpp
parent999d15b5dca5de7c32ddb87469d5c78136473de7 (diff)
downloadsandhi-a1449c97eefa1635680ede98f61ab3538c56eb21.tar.gz
sandhi-a1449c97eefa1635680ede98f61ab3538c56eb21.tar.bz2
sandhi-a1449c97eefa1635680ede98f61ab3538c56eb21.zip
changed lookahead to preload, thats all it is
Diffstat (limited to 'lib/block_allocator.cpp')
-rw-r--r--lib/block_allocator.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/block_allocator.cpp b/lib/block_allocator.cpp
index 72d8150..64b3aed 100644
--- a/lib/block_allocator.cpp
+++ b/lib/block_allocator.cpp
@@ -10,7 +10,6 @@ using namespace gras;
const size_t AT_LEAST_DEFAULT_ITEMS = 1 << 13;
const size_t AHH_TOO_MANY_BYTES = 1 << 20; //TODO
const size_t THIS_MANY_BUFFERS = 32;
-const double EDGE_CASE_MITIGATION = 8.0; //edge case mitigation constant
//TODO will need more complicated later
@@ -39,15 +38,8 @@ static size_t recommend_length(
min_bytes = std::max(min_bytes, hint.reserve_bytes);
}
- //step 2) N x super reserve to minimize history edge case
+ //step 2) N x super reserve of hard-coded mimimum items
size_t Nmin_bytes = min_bytes;
- BOOST_FOREACH(const OutputHintMessage &hint, hints)
- {
- while (hint.history_bytes*EDGE_CASE_MITIGATION > Nmin_bytes)
- {
- Nmin_bytes += min_bytes;
- }
- }
while (hint_bytes > Nmin_bytes)
{
Nmin_bytes += min_bytes;