diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/btree/bt_delete.c')
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_delete.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/src/btree/bt_delete.c b/src/third_party/wiredtiger/src/btree/bt_delete.c index 479f6547e42..8cca6328f21 100644 --- a/src/third_party/wiredtiger/src/btree/bt_delete.c +++ b/src/third_party/wiredtiger/src/btree/bt_delete.c @@ -264,6 +264,7 @@ __wt_delete_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref) WT_PAGE *page; WT_PAGE_DELETED *page_del; WT_UPDATE **upd_array, *upd; + size_t size; uint32_t i; btree = S2BT(session); @@ -323,7 +324,7 @@ __wt_delete_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref) * structures, fill in the per-page update array with references to * deleted items. */ - for (i = 0; i < page->pg_row_entries; ++i) { + for (i = 0, size = 0; i < page->pg_row_entries; ++i) { WT_ERR(__wt_calloc_one(session, &upd)); WT_UPDATE_DELETED_SET(upd); @@ -336,10 +337,11 @@ __wt_delete_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref) upd->next = upd_array[i]; upd_array[i] = upd; + + size += sizeof(WT_UPDATE *) + WT_UPDATE_MEMSIZE(upd); } - __wt_cache_page_inmem_incr(session, page, - page->pg_row_entries * (sizeof(WT_UPDATE *) + sizeof(WT_UPDATE))); + __wt_cache_page_inmem_incr(session, page, size); return (0); |