Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: src/liblzma/common/index.c

Issue 7109015: Update XZ Utils to 5.0.3 (in deps) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/liblzma/common/filter_encoder.c ('k') | src/liblzma/common/index_decoder.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /////////////////////////////////////////////////////////////////////////////// 1 ///////////////////////////////////////////////////////////////////////////////
2 // 2 //
3 /// \file index.c 3 /// \file index.c
4 /// \brief Handling of .xz Indexes and some other Stream information 4 /// \brief Handling of .xz Indexes and some other Stream information
5 // 5 //
6 // Author: Lasse Collin 6 // Author: Lasse Collin
7 // 7 //
8 // This file has been put into the public domain. 8 // This file has been put into the public domain.
9 // You can do whatever you want with this file. 9 // You can do whatever you want with this file.
10 // 10 //
11 /////////////////////////////////////////////////////////////////////////////// 11 ///////////////////////////////////////////////////////////////////////////////
12 12
13 #include "index.h" 13 #include "index.h"
14 #include "stream_flags_common.h" 14 #include "stream_flags_common.h"
15 15
16 16
17 /// \brief How many Records to allocate at once 17 /// \brief How many Records to allocate at once
18 /// 18 ///
19 /// This should be big enough to avoid making lots of tiny allocations 19 /// This should be big enough to avoid making lots of tiny allocations
20 /// but small enough to avoid too much unused memory at once. 20 /// but small enough to avoid too much unused memory at once.
21 #define INDEX_GROUP_SIZE 500 21 #define INDEX_GROUP_SIZE 512
22 22
23 23
24 /// \brief How many Records can be allocated at once at maximum 24 /// \brief How many Records can be allocated at once at maximum
25 #define PREALLOC_MAX ((SIZE_MAX - sizeof(index_group)) / sizeof(index_record)) 25 #define PREALLOC_MAX ((SIZE_MAX - sizeof(index_group)) / sizeof(index_record))
26 26
27 27
28 /// \brief Base structure for index_stream and index_group structures 28 /// \brief Base structure for index_stream and index_group structures
29 typedef struct index_tree_node_s index_tree_node; 29 typedef struct index_tree_node_s index_tree_node;
30 struct index_tree_node_s { 30 struct index_tree_node_s {
31 /// Uncompressed start offset of this Stream (relative to the 31 /// Uncompressed start offset of this Stream (relative to the
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 } 1232 }
1233 1233
1234 iter->internal[ITER_STREAM].p = stream; 1234 iter->internal[ITER_STREAM].p = stream;
1235 iter->internal[ITER_GROUP].p = group; 1235 iter->internal[ITER_GROUP].p = group;
1236 iter->internal[ITER_RECORD].s = left; 1236 iter->internal[ITER_RECORD].s = left;
1237 1237
1238 iter_set_info(iter); 1238 iter_set_info(iter);
1239 1239
1240 return false; 1240 return false;
1241 } 1241 }
OLDNEW
« no previous file with comments | « src/liblzma/common/filter_encoder.c ('k') | src/liblzma/common/index_decoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698