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

Side by Side Diff: mojo/edk/embedder/configuration.h

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « mojo/edk/embedder/channel_init.cc ('k') | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_EMBEDDER_CONFIGURATION_H_
6 #define MOJO_EDK_EMBEDDER_CONFIGURATION_H_
7
8 #include <stddef.h>
9
10 namespace mojo {
11 namespace embedder {
12
13 // A set of constants that the Mojo system internally uses. These values should
14 // be consistent across all processes on the same system.
15 //
16 // In general, there should be no need to change these values from their
17 // defaults. However, if you do change them, you must do so before
18 // initialization.
19 struct Configuration {
20 // Maximum number of open (Mojo) handles. The default is 1,000,000.
21 //
22 // TODO(vtl): This doesn't count "live" handles, some of which may live in
23 // messages.
24 size_t max_handle_table_size;
25
26 // Maximum number of active memory mappings. The default is 1,000,000.
27 size_t max_mapping_table_sze;
28
29 // Upper limit of |MojoWaitMany()|'s |num_handles|. The default is 1,000,000.
30 // Must be same as or smaller than |max_handle_table_size|.
31 size_t max_wait_many_num_handles;
32
33 // Maximum data size of messages sent over message pipes, in bytes. The
34 // default is 4MB.
35 size_t max_message_num_bytes;
36
37 // Maximum number of handles that can be attached to messages sent over
38 // message pipes. The default is 10,000.
39 size_t max_message_num_handles;
40
41 // Maximum capacity of a data pipe, in bytes. The default is 256MB. This value
42 // must fit into a |uint32_t|. WARNING: If you bump it closer to 2^32, you
43 // must audit all the code to check that we don't overflow (2^31 would
44 // definitely be risky; up to 2^30 is probably okay).
45 size_t max_data_pipe_capacity_bytes;
46
47 // Default data pipe capacity, if not specified explicitly in the creation
48 // options. The default is 1MB.
49 size_t default_data_pipe_capacity_bytes;
50
51 // Alignment for the "start" of the data buffer used by data pipes. (The
52 // alignment of elements will depend on this and the element size.) The
53 // default is 16 bytes.
54 size_t data_pipe_buffer_alignment_bytes;
55
56 // Maximum size of a single shared memory segment, in bytes. The default is
57 // 1GB.
58 //
59 // TODO(vtl): Set this hard limit appropriately (e.g., higher on 64-bit).
60 // (This will also entail some auditing to make sure I'm not messing up my
61 // checks anywhere.)
62 size_t max_shared_memory_num_bytes;
63 };
64
65 } // namespace embedder
66 } // namespace mojo
67
68 #endif // MOJO_EDK_EMBEDDER_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « mojo/edk/embedder/channel_init.cc ('k') | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698