/* -*-C-*-
-$Id: config.h,v 9.100 1999/01/02 06:11:34 cph Exp $
+$Id: config.h,v 9.101 2000/01/31 03:32:45 cph Exp $
-Copyright (c) 1987-1999 Massachusetts Institute of Technology
+Copyright (c) 1987-2000 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define HEAP_FREE(address)
#endif
+#ifdef __FreeBSD__
+extern void * freebsd_heap_malloc (unsigned long);
+#define HEAP_MALLOC freebsd_heap_malloc
+#define HEAP_FREE(address)
+#endif
+
/* !WINNT_RAW_ADDRESSES is useful only for Windows 3.1, which we no
longer support -- so define it always. */
#ifdef WINNT
/* -*-C-*-
-$Id: ux.c,v 1.17 1999/01/02 06:11:34 cph Exp $
+$Id: ux.c,v 1.18 2000/01/31 03:32:37 cph Exp $
-Copyright (c) 1990-1999 Massachusetts Institute of Technology
+Copyright (c) 1990-2000 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
#endif /* __linux */
+
+#ifdef __FreeBSD__
+
+#include <sys/mman.h>
+
+void *
+freebsd_heap_malloc (unsigned long requested_length)
+{
+ unsigned long ps = (getpagesize ());
+ char * p = ((char *) ps);
+ void * addr;
+ while (p < 0x04000000)
+ {
+ addr
+ = (mmap (p,
+ (((requested_length + (ps - 1)) / ps) * ps),
+ (PROT_EXEC | PROT_READ | PROT_WRITE),
+ (MAP_PRIVATE | MAP_ANON | MAP_FIXED),
+ (-1), 0));
+ if (addr != MAP_FAILED)
+ return (addr);
+ p += ps;
+ }
+ return (0);
+}
+
+#endif /* __FreeBSD__ */