leave 2 pages in reserve for stale pin test (as opposed to one)

This commit is contained in:
Sears Russell 2010-04-19 23:09:30 +00:00
parent 887832582c
commit 5138af6d1c

View file

@ -333,14 +333,14 @@ static void stalePinTestImpl(stasis_buffer_manager_t * (*fact)(stasis_log_t*, st
Tinit(); Tinit();
Page * p[MAX_BUFFER_SIZE-1]; Page * p[MAX_BUFFER_SIZE-1];
for(int i = 0; i < MAX_BUFFER_SIZE-1; i++) { for(int i = 0; i < MAX_BUFFER_SIZE-2; i++) {
p[i] = loadUninitializedPage(-1, i); p[i] = loadUninitializedPage(-1, i);
} }
for(int i = 0; i < MAX_BUFFER_SIZE; i++) { for(int i = 0; i < MAX_BUFFER_SIZE; i++) {
Page * foo = loadUninitializedPage(-1, i+MAX_BUFFER_SIZE); Page * foo = loadUninitializedPage(-1, i+MAX_BUFFER_SIZE);
releasePage(foo); releasePage(foo);
} }
for(int i = 0; i < MAX_BUFFER_SIZE-1; i++) { for(int i = 0; i < MAX_BUFFER_SIZE-2; i++) {
releasePage(p[i]); releasePage(p[i]);
} }
Tdeinit(); Tdeinit();