1 // Copyright 2013 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.
5 #ifndef MOJO_SYSTEM_CONSTANTS_H_
6 #define MOJO_SYSTEM_CONSTANTS_H_
13 // Maximum of open (Mojo) handles.
14 // TODO(vtl): This doesn't count "live" handles, some of which may live in
16 const size_t kMaxHandleTableSize
= 1000000;
18 const size_t kMaxWaitManyNumHandles
= kMaxHandleTableSize
;
20 const size_t kMaxMessageNumBytes
= 4 * 1024 * 1024;
22 const size_t kMaxMessageNumHandles
= 10000;
24 // Maximum capacity of a data pipe, in bytes. This value must fit into a
26 // WARNING: If you bump it closer to 2^32, you must audit all the code to check
27 // that we don't overflow (2^31 would definitely be risky; up to 2^30 is
29 const size_t kMaxDataPipeCapacityBytes
= 256 * 1024 * 1024; // 256 MB.
31 const size_t kDefaultDataPipeCapacityBytes
= 1024 * 1024; // 1 MB.
33 // Alignment for the "start" of the data buffer used by data pipes. (The
34 // alignment of elements will depend on this and the element size.)
35 const size_t kDataPipeBufferAlignmentBytes
= 16;
40 #endif // MOJO_SYSTEM_CONSTANTS_H_