Commit fc2c6729 authored by marko's avatar marko

branches/zip: Remove buf_pool->frame_zero and buf_pool->high_end.

parent e5eb6187
...@@ -665,9 +665,6 @@ buf_pool_init( ...@@ -665,9 +665,6 @@ buf_pool_init(
frame = ut_align(buf_pool->frame_mem, UNIV_PAGE_SIZE); frame = ut_align(buf_pool->frame_mem, UNIV_PAGE_SIZE);
buf_pool->frame_zero = frame;
buf_pool->high_end = frame + UNIV_PAGE_SIZE * n_frames;
/* Init block structs and assign frames for them. Then we /* Init block structs and assign frames for them. Then we
assign the frames to the first blocks (we already mapped the assign the frames to the first blocks (we already mapped the
memory above). */ memory above). */
...@@ -676,9 +673,9 @@ buf_pool_init( ...@@ -676,9 +673,9 @@ buf_pool_init(
block = buf_pool_get_nth_block(buf_pool, i); block = buf_pool_get_nth_block(buf_pool, i);
frame = buf_pool->frame_zero + i * UNIV_PAGE_SIZE;
buf_block_init(block, frame); buf_block_init(block, frame);
frame += UNIV_PAGE_SIZE;
} }
buf_pool->page_hash = hash_create(2 * curr_size); buf_pool->page_hash = hash_create(2 * curr_size);
......
...@@ -830,11 +830,6 @@ struct buf_pool_struct{ ...@@ -830,11 +830,6 @@ struct buf_pool_struct{
read-write lock in them */ read-write lock in them */
byte* frame_mem; /* pointer to the memory area which byte* frame_mem; /* pointer to the memory area which
was allocated for the frames */ was allocated for the frames */
byte* frame_zero; /* pointer to the first buffer frame:
this may differ from frame_mem, because
this is aligned by the frame size */
byte* high_end; /* pointer to the end of the buffer
frames */
buf_block_t* blocks; /* array of buffer control blocks */ buf_block_t* blocks; /* array of buffer control blocks */
ulint curr_size; /* current pool size in pages */ ulint curr_size; /* current pool size in pages */
hash_table_t* page_hash; /* hash table of the file pages */ hash_table_t* page_hash; /* hash table of the file pages */
......
...@@ -57,13 +57,6 @@ mlog_write_initial_log_record( ...@@ -57,13 +57,6 @@ mlog_write_initial_log_record(
ut_ad(type <= MLOG_BIGGEST_TYPE); ut_ad(type <= MLOG_BIGGEST_TYPE);
ut_ad(type > MLOG_8BYTES); ut_ad(type > MLOG_8BYTES);
if (ptr < buf_pool->frame_zero || ptr >= buf_pool->high_end) {
fprintf(stderr,
"InnoDB: Error: trying to write to"
" a stray memory location %p\n", (void*) ptr);
ut_error;
}
log_ptr = mlog_open(mtr, 11); log_ptr = mlog_open(mtr, 11);
/* If no logging is requested, we may return now */ /* If no logging is requested, we may return now */
...@@ -240,14 +233,6 @@ mlog_write_ulint( ...@@ -240,14 +233,6 @@ mlog_write_ulint(
{ {
byte* log_ptr; byte* log_ptr;
if (UNIV_UNLIKELY(ptr < buf_pool->frame_zero)
|| UNIV_UNLIKELY(ptr >= buf_pool->high_end)) {
fprintf(stderr,
"InnoDB: Error: trying to write to"
" a stray memory location %p\n", (void*) ptr);
ut_error;
}
switch (type) { switch (type) {
case MLOG_1BYTE: case MLOG_1BYTE:
mach_write_to_1(ptr, val); mach_write_to_1(ptr, val);
...@@ -293,14 +278,6 @@ mlog_write_dulint( ...@@ -293,14 +278,6 @@ mlog_write_dulint(
{ {
byte* log_ptr; byte* log_ptr;
if (UNIV_UNLIKELY(ptr < buf_pool->frame_zero)
|| UNIV_UNLIKELY(ptr >= buf_pool->high_end)) {
fprintf(stderr,
"InnoDB: Error: trying to write to"
" a stray memory location %p\n", (void*) ptr);
ut_error;
}
ut_ad(ptr && mtr); ut_ad(ptr && mtr);
mach_write_to_8(ptr, val); mach_write_to_8(ptr, val);
...@@ -336,13 +313,6 @@ mlog_write_string( ...@@ -336,13 +313,6 @@ mlog_write_string(
ulint len, /* in: string length */ ulint len, /* in: string length */
mtr_t* mtr) /* in: mini-transaction handle */ mtr_t* mtr) /* in: mini-transaction handle */
{ {
if (UNIV_UNLIKELY(ptr < buf_pool->frame_zero)
|| UNIV_UNLIKELY(ptr >= buf_pool->high_end)) {
fprintf(stderr,
"InnoDB: Error: trying to write to"
" a stray memory location %p\n", (void*) ptr);
ut_error;
}
ut_ad(ptr && mtr); ut_ad(ptr && mtr);
ut_a(len < UNIV_PAGE_SIZE); ut_a(len < UNIV_PAGE_SIZE);
......
...@@ -3795,13 +3795,9 @@ wrong_offs: ...@@ -3795,13 +3795,9 @@ wrong_offs:
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
buf_page_print(page_align(rec), 0); buf_page_print(page_align(rec), 0);
fprintf(stderr, fprintf(stderr,
"\nInnoDB: rec address %p, first" "\nInnoDB: rec address %p,"
" buffer frame %p\n"
"InnoDB: buffer pool high end %p,"
" buf block fix count %lu\n", " buf block fix count %lu\n",
(void*) rec, (void*) buf_pool->frame_zero, (void*) rec, (ulong)
(void*) buf_pool->high_end,
(ulong)
btr_cur_get_block(btr_pcur_get_btr_cur(pcur)) btr_cur_get_block(btr_pcur_get_btr_cur(pcur))
->buf_fix_count); ->buf_fix_count);
fprintf(stderr, fprintf(stderr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment