Update of /cvsroot/monetdb/sql/src/tools
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6968
Modified Files:
Mserver.mx
Log Message:
re-aligned code for statically linked Mserver with MonetDB4
Index: Mserver.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/tools/Mserver.mx,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- Mserver.mx 23 Jan 2007 01:56:12 -0000 1.40
+++ Mserver.mx 15 Aug 2007 12:12:44 -0000 1.41
@@ -116,7 +116,7 @@
static int malloc_init = 1;
#endif
@c
-void
+static void
usage(char *prog, int debug, opt *set, int setlen)
{
fprintf(stderr, "Usage: %s [ options ] [ script+ ]
\n", prog);
@@ -167,9 +167,11 @@
if ((p = mo_find_option(set, setlen, "gdk_debug")))
GDKdebug = strtol(p, NULL, 10);
- if ((p = mo_find_option(set, setlen, "gdk_mem_pagebits"))) {
+ if ((p = mo_find_option(set, setlen, "gdk_mem_pagebits")))
GDK_mem_pagebits = strtol(p, NULL, 10);
- }
+
+ if ((p = mo_find_option(set, setlen, "gdk_vmtrim")))
+ GDK_vm_trim = strcasecmp(p, "yes") == 0;
/* determine Monet's kernel settings. */
if (!GDKinit(dbname, dbfarm, strcasecmp(alloc_map, "yes") == 0)) {
@@ -213,15 +215,6 @@
/* sanity check to avoid memory fragmentation */
GDK_mem_bigsize = (size_t) MIN(max_mem_bigsize, strtol(p, NULL,
10));
}
- if ((p = GDKgetenv("gdk_vm_minsize"))){
- /* when allocating HUGE regions, switch from vmalloc() to
mmap() on a real file */
- /* for 32-bits systems HUGE = RAM/8, for 64-bits systems HUGE =
RAM/2 */
- lng max_vm_minsize =
((lng)GDK_mem_maxsize*sizeof(void*)*sizeof(void*))/128;
-
- /* sanity check to avoid running out of swap space */
- GDK_vm_minsize = (size_t) MIN(max_vm_minsize, strtol(p, NULL,
10));
- }
-
if (GDKgetenv_isyes("gdk_embedded") || GDKgetenv_isyes("embedded")) {
GDKembedded = 1;
monet_daemon = 1;
@@ -310,13 +303,12 @@
for (;;) {
int option_index = 0;
- int c = getopt_long(argc, av, "c:d::?s:",
- long_options, &option_index);
+ int opt = getopt_long(argc, av, "c:d::?s:", long_options,
&option_index);
- if (c == -1)
+ if (opt == -1)
break;
- switch (c) {
+ switch (opt) {
case 0:
if (strcmp(long_options[option_index].name, "dbname")
== 0) {
setlen = mo_add_option(&set, setlen,
opt_cmdline, "gdk_dbname", optarg);
@@ -346,9 +338,10 @@
setlen = mo_add_option(&set, setlen, opt_cmdline,
"config", optarg);
break;
case 'd':
- debug = 1;
if (optarg) {
setlen = mo_add_option(&set, setlen,
opt_cmdline, "gdk_debug", optarg);
+ } else {
+ debug = 1;
}
break;
case 's':{
@@ -366,7 +359,7 @@
case '?':
usage(prog, debug, set, setlen);
default:
- fprintf(stderr, "!ERROR: getopt returned character code
0%o ??\n", c);
+ fprintf(stderr, "!ERROR: getopt returned character code
0%o ??\n", opt);
usage(prog, debug, set, setlen);
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins