Changeset 139
- Timestamp:
- 06/15/06 05:32:23 (3 years ago)
- Files:
-
- trunk/debian/changelog (modified) (1 diff)
- trunk/src/main.c (modified) (2 diffs)
- trunk/src/main.h (modified) (1 diff)
- trunk/src/opts.c (modified) (1 diff)
- trunk/src/swaps.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/debian/changelog
r125 r139 1 swapspace (1.6) stable; urgency=low 2 3 * Attempt to free up all swapfiles on uninstall 4 * Compile fixes: PAGE_SIZE is not a constant anymore 5 * Makefile supports dist and distclean targets 6 * Updated to newer version of Debian standards 7 * Documented algorithm as Finite State Machine graph (using graphviz) 8 * Updated copyright notices 9 10 -- Jeroen T. Vermeulen <jtv@thaiopensource.org> Thu, 15 Jun 2006 16:20:00 +0700 11 1 12 swapspace (1.5) unstable; urgency=low 2 13 trunk/src/main.c
r138 r139 46 46 #include "swaps.h" 47 47 48 char localbuf[ 8192];48 char localbuf[16384]; 49 49 time_t clock = 0; 50 50 … … 386 386 int main(int argc, char *argv[]) 387 387 { 388 assert(sizeof(localbuf) >= PAGE_SIZE); 389 388 390 close(STDIN_FILENO); 389 391 setlocale(LC_ALL, "C"); trunk/src/main.h
r138 r139 41 41 * allocation (and even wild fluctuations in stack use) may really matter here. 42 42 * 43 * Size is best kept to an even multiple of page size. 43 * Size is best kept to an even multiple of page size, and is guaranteed to be 44 * no less than PAGE_SIZE. 44 45 */ 45 extern char localbuf[ PAGE_SIZE*2];46 extern char localbuf[16384]; 46 47 47 48 /// Timestamp counter trunk/src/opts.c
r138 r139 100 100 { "lower_freelimit", 'l', at_num, 0, 99, set_lower_freelimit, 101 101 "Try to keep at least n% of memory/swap available" }, 102 { "max_swapsize", 'M', at_num, PAGE_SIZE, LLONG_MAX, set_max_swapsize,102 { "max_swapsize", 'M', at_num, 8192, LLONG_MAX, set_max_swapsize, 103 103 "Restrict swapfiles to n bytes" }, 104 { "min_swapsize", 'm', at_num, PAGE_SIZE, LLONG_MAX, set_min_swapsize,104 { "min_swapsize", 'm', at_num, 8192, LLONG_MAX, set_min_swapsize, 105 105 "Don't create swapfiles smaller than n bytes" }, 106 106 { "paranoid", 'P', at_none, 0, 0, set_paranoid, trunk/src/swaps.c
r138 r139 60 60 61 61 /// Smallest allowed swapfile size 62 static memsize_t min_swapsize = TRUNC_TO_PAGE(4*MEGA);62 static memsize_t min_swapsize = 4*MEGA; 63 63 /// Largest allowed swapfile size 64 64 /** Don't set this too low. The program will learn if it runs into file size 65 65 * limits. 66 66 */ 67 static memsize_t max_swapsize = TRUNC_TO_PAGE(2*TERA);67 static memsize_t max_swapsize = 2*TERA; 68 68 69 69
