{"thread":{"id":"6823","subject":"[PATCH] sha1_file.c: Round the mmap offset to half the window size.","startedAt":"2007-02-14T17:11:40Z","lastAt":"2007-02-14T17:11:40Z","messageCount":1,"participants":["Alexandre Julliard"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"34571","messageId":"878xf08y0j.fsf@wine.dyndns.org","threadId":"6823","inReplyTo":null,"subject":"[PATCH] sha1_file.c: Round the mmap offset to half the window size.","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2007-02-14T17:11:40Z","receivedAt":"2007-02-14T17:11:40Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"This ensures that a given area is mapped at most twice, and greatly\nreduces the virtual address space usage.\n\nSigned-off-by: Alexandre Julliard <julliard@winehq.org>\n---\n sha1_file.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 8ad7fad..a217c3c 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -665,7 +665,7 @@ unsigned char* use_pack(struct packed_git *p,\n \t\t\tif (!page_size)\n \t\t\t\tpage_size = getpagesize();\n \t\t\twin = xcalloc(1, sizeof(*win));\n-\t\t\twin->offset = (offset / page_size) * page_size;\n+\t\t\twin->offset = (offset / (packed_git_window_size/2)) * (packed_git_window_size/2);\n \t\t\twin->len = p->pack_size - win->offset;\n \t\t\tif (win->len > packed_git_window_size)\n \t\t\t\twin->len = packed_git_window_size;\n-- \n1.5.0.7.g2fa71\n\n-- \nAlexandre Julliard\njulliard@winehq.org\n"}]}