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

Unified Diff: mojo/system/limits.h

Issue 23621056: Initial in-process implementation of some Mojo primitives. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wip18.1 Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: mojo/system/limits.h
diff --git a/mojo/system/limits.h b/mojo/system/limits.h
new file mode 100644
index 0000000000000000000000000000000000000000..e91bcb7f6a787acaf6c88394ddd891caab189bc4
--- /dev/null
+++ b/mojo/system/limits.h
@@ -0,0 +1,25 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_SYSTEM_LIMITS_H_
+#define MOJO_SYSTEM_LIMITS_H_
+
+namespace mojo {
+namespace system {
+
+// Maximum of open (Mojo) handles.
+// TODO(vtl): This doesn't count "live" handles, some of which may live in
+// messages.
+const size_t kMaxHandleTableSize = 1000000;
+
+const size_t kMaxWaitManyNumHandles = 256;
darin (slow to review) 2013/09/25 06:06:07 In practice, I think we will quickly exceed this l
viettrungluu 2013/09/25 18:22:16 Okay. (256 was a low-ish number that I chose arbit
+
+const size_t kMaxMessageNumBytes = 4 * 1024 * 1024;
+
+const size_t kMaxMessageNumHandles = 256;
darin (slow to review) 2013/09/25 06:06:07 i'd be tempted to also allow this to be larger unl
viettrungluu 2013/09/25 18:22:16 Ditto. What do you think of 1024 as the limit for
+
+} // namespace system
+} // namespace mojo
+
+#endif // MOJO_SYSTEM_LIMITS_H_

Powered by Google App Engine
This is Rietveld 408576698