Changeset: 1800fa46d44d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1800fa46d44d
Modified Files:
NT/monetdb_config.h.in
gdk/gdk_posix.h
tools/mserver/mserver5.c
Branch: Jul2017
Log Message:
Cleanup: remove mallopt code: HAVE_MALLOPT was never defined.
diffs (84 lines):
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -347,9 +347,6 @@
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
-/* Define to 1 if you have the `mallopt' function. */
-/* #undef HAVE_MALLOPT */
-
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
diff --git a/gdk/gdk_posix.h b/gdk/gdk_posix.h
--- a/gdk/gdk_posix.h
+++ b/gdk/gdk_posix.h
@@ -41,29 +41,6 @@
#include <direct.h>
#endif
-/* Some systems (SGI, Sun) call malloc before we get a chance to call
- * mallopt, and mallopt should be called before the first call to
- * malloc. Therefore we do as if we don't have mallopt, even though
- * in reality we do. */
-#ifdef HAVE_MALLOPT
-#undef HAVE_MALLOPT
-#endif
-
-#ifndef M_MXFAST
-#define M_MXFAST 1 /* set size of blocks to be fast */
-#endif
-#ifndef M_NLBLKS
-#define M_NLBLKS 2 /* set number of block in a holding block */
-#endif
-#ifndef M_GRAIN
-#define M_GRAIN 3 /* set number of sizes mapped to one,
for */
- /* small blocks */
-#endif
-#ifndef M_KEEP
-#define M_KEEP 4 /* retain contents of block after a free */
- /* until another allocation */
-#endif
-
/*
* @- locking, sleep
*/
diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c
--- a/tools/mserver/mserver5.c
+++ b/tools/mserver/mserver5.c
@@ -51,7 +51,6 @@
#define getcwd _getcwd
#endif
-static int malloc_init = 1;
#ifdef HAVE_CONSOLE
static int monet_daemon;
#endif
@@ -287,26 +286,6 @@ main(int argc, char **av)
GDKfatal("cannot set locale\n");
}
-#ifdef HAVE_MALLOPT
- if (malloc_init) {
-/* for (Red Hat) Linux (6.2) unused and ignored at least as of glibc-2.1.3-15
*/
-/* for (Red Hat) Linux (8) used at least as of glibc-2.2.93-5 */
- if (mallopt(M_MXFAST, 192)) {
- fprintf(stderr, "!monet: mallopt(M_MXFAST,192)
fails.\n");
- exit(-1);
- }
-#ifdef M_BLKSZ
- if (mallopt(M_BLKSZ, 8 * 1024)) {
- fprintf(stderr, "!monet: mallopt(M_BLKSZ,8*1024)
fails.\n");
- exit(-1);
- }
-#endif
- }
- malloc_init = 0;
-#else
- (void) malloc_init; /* still unused */
-#endif
-
if (getcwd(monet_cwd, PATHLENGTH - 1) == NULL) {
perror("pwd");
fprintf(stderr,"monet_init: could not determine current
directory\n");
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list