diff options
author | Michael Schroeder <mls@suse.de> | 2012-11-28 15:31:09 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-11-28 15:31:09 +0100 |
commit | 2410abfc3fe2170cc814e5b84887e83089016bfa (patch) | |
tree | a8ea3b69d365dfef6f2814265d5335e90995ae66 /src/repopage.h | |
parent | 9c90b39ddaf9aaac9740c9b6e719395050c8b04a (diff) | |
download | libsolv-2410abfc3fe2170cc814e5b84887e83089016bfa.tar.gz libsolv-2410abfc3fe2170cc814e5b84887e83089016bfa.tar.bz2 libsolv-2410abfc3fe2170cc814e5b84887e83089016bfa.zip |
reduce memory by splitting the pages array into two mapped_at and file_pages arrays
Diffstat (limited to 'src/repopage.h')
-rw-r--r-- | src/repopage.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/repopage.h b/src/repopage.h index 3ea834c..b70a2f3 100644 --- a/src/repopage.h +++ b/src/repopage.h @@ -13,11 +13,6 @@ typedef struct _Attrblobpage { - /* mapped_at == -1 --> not loaded, otherwise offset into - store->blob_store. The size of the mapping is REPOPAGE_BLOBSIZE - except for the last page. */ - unsigned int mapped_at; - /* page_size == 0 means the page is not backed by some file storage. Otherwise it is L*2+(compressed ? 1 : 0), with L being the data length. */ @@ -30,9 +25,15 @@ typedef struct _Repopagestore { long file_offset; /* pages in file start here */ unsigned char *blob_store; - Attrblobpage *pages; unsigned int num_pages; + /* mapped_at[page] == -1 --> not loaded, otherwise offset into + store->blob_store. The size of the mapping is REPOPAGE_BLOBSIZE + except for the last page. */ + unsigned int *mapped_at; + + Attrblobpage *file_pages; + /* mapped[i] is zero if nothing is mapped at logical page I, otherwise it contains the pagenumber plus one (of the mapped page). */ unsigned int *mapped; |