Refactor packed_git to prepare for sliding mmap windows.
authorShawn O. Pearce <spearce@spearce.org>
Sat, 23 Dec 2006 07:33:44 +0000 (02:33 -0500)
committerJunio C Hamano <junkio@cox.net>
Fri, 29 Dec 2006 19:36:44 +0000 (11:36 -0800)
commitc41ee586dc95b757cdff4deae10a30a691ba758b
treeeec4ec30022fd611ef975f78a8de1f3dfd2cf7d6
parent77ccc5bbd1bd403abd5f552be7210073bea856a6
Refactor packed_git to prepare for sliding mmap windows.

The idea behind the sliding mmap window pack reader implementation
is to have multiple mmap regions active against the same pack file,
thereby allowing the process to mmap in only the active/hot sections
of the pack and reduce overall virtual address space usage.

To implement this we need to refactor the mmap related data
(pack_base, pack_use_cnt) out of struct packed_git and move them
into a new struct pack_window.

We are refactoring the code to support a single struct pack_window
per packfile, thereby emulating the prior behavior of mmap'ing the
entire pack file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pack-objects.c
cache.h
pack-check.c
sha1_file.c