aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-10-14 11:06:26 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2010-10-14 11:06:26 -0400
commit7bf0a0124a6c8a834983a660af53d8789ac0a8ac (patch)
tree628ead017a0f1cf2138f9f9b08088debf81e1ce5 /src/cjr_print.sml
parent4e608544ebe87dd991d53ded5267f14f5df93b8b (diff)
Interface for setting memory limits
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index ae347eb2..29f94fe6 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2828,6 +2828,26 @@ fun p_file env (ds, ps) =
newline,
newline,
+ box [string "static void uw_setup_limits() {",
+ newline,
+ box [p_list_sep (box []) (fn (class, num) =>
+ let
+ val num = case class of
+ "page" => Int.max (2048, num)
+ | _ => num
+ in
+ box [string ("uw_" ^ class ^ "_max"),
+ space,
+ string "=",
+ space,
+ string (Int.toString num),
+ string ";",
+ newline]
+ end) (Settings.limits ())],
+ string "}",
+ newline,
+ newline],
+
#code (Settings.currentProtocol ()) (),
if hasDb then
@@ -2837,17 +2857,17 @@ fun p_file env (ds, ps) =
views = !views,
sequences = !sequences}
else
- box [string "void uw_client_init(void) { };",
+ box [string "static void uw_client_init(void) { };",
newline,
- string "void uw_db_init(uw_context ctx) { };",
+ string "static void uw_db_init(uw_context ctx) { };",
newline,
- string "int uw_db_begin(uw_context ctx) { return 0; };",
+ string "static int uw_db_begin(uw_context ctx) { return 0; };",
newline,
- string "void uw_db_close(uw_context ctx) { };",
+ string "static void uw_db_close(uw_context ctx) { };",
newline,
- string "int uw_db_commit(uw_context ctx) { return 0; };",
+ string "static int uw_db_commit(uw_context ctx) { return 0; };",
newline,
- string "int uw_db_rollback(uw_context ctx) { return 0; };"],
+ string "static int uw_db_rollback(uw_context ctx) { return 0; };"],
newline,
newline,