Skip to content
Snippets Groups Projects
Commit 62e61177 authored by pw's avatar pw
Browse files

Move first use of malloc() (definition of T and NIL) to after

validate() to avoid conflicts with possible use of mmap by malloc().
Tested only on FreeBSD but should work ok on other platforms too.
parent dd33ceb1
No related branches found
No related tags found
No related merge requests found
/*
* main() entry point for a stand alone lisp image.
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.15 1999/02/20 15:54:44 pw Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.16 1999/09/09 16:22:44 pw Exp $
*
*/
......@@ -100,8 +100,6 @@ void main(int argc, char *argv[], char *envp[])
set_lossage_handler(ldb_monitor);
define_var("nil", NIL, TRUE);
define_var("t", T, TRUE);
monitor = FALSE;
argptr = argv;
......@@ -170,6 +168,14 @@ void main(int argc, char *argv[], char *envp[])
os_init();
gc_init();
validate();
/* This is the first use of malloc() and must come after the
* static memory layout is mmapped to avoid conflicts with possible
* use of mmap() by malloc().
*/
define_var("nil", NIL, TRUE);
define_var("t" , T, TRUE);
globals_init();
initial_function = load_core_file(core);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment