29 #include "../my_config.h"
55 U_I initial_size = 10240,
56 U_I unused_read_ratio = 10,
57 U_I observation_read_number = 100,
58 U_I max_size_hit_read_ratio = 50,
59 U_I unused_write_ratio = 10,
60 U_I observation_write_number = 100,
61 U_I max_size_hit_write_ratio = 50);
63 const cache & operator = (
const cache & ref) {
throw SRC_BUG; };
88 buf() { buffer = NULL; size = next = last = 0; };
89 buf(
const buf &ref) {
throw SRC_BUG; };
90 ~buf() {
if(buffer != NULL)
delete [] buffer; };
91 void resize(U_I newsize);
93 void clear() { next = last = 0; };
98 struct buf buffer_cache;
99 infinint current_position;
102 bool failed_increase;
106 U_I read_unused_rate;
107 U_I read_overused_rate;
110 U_I write_unused_rate;
111 U_I write_overused_rate;
113 U_I stat_read_unused;
114 U_I stat_read_overused;
115 U_I stat_read_counter;
117 U_I stat_write_overused;
118 U_I stat_write_counter;
122 void clear_read() {
if(read_mode) buffer_cache.clear(); };