1 /* Copyright (C) 2004-2009 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
10 Bool MLton_Platform_CygwinUseMmap
= TRUE
;
12 void GC_setCygwinUseMmap (bool b
) {
13 MLton_Platform_CygwinUseMmap
= b
;
16 void MLton_init (int argc
, char **argv
, GC_state s
) {
19 Posix_ProcEnv_environ
= (C_StringArray_t
)environ
;
20 start
= GC_init (s
, argc
, argv
);
21 /* Setup argv and argc that SML sees. */
22 /* start is now the index of the first real arg. */
23 CommandLine_commandName
= (C_String_t
)(argv
[0]);
24 CommandLine_argc
= argc
- start
;
25 CommandLine_argv
= (C_StringArray_t
)(argv
+ start
);
28 void MLton_halt (GC_state s
, C_Int_t status
) {
33 void MLton_heapCheckTooLarge (void) {
34 die ("Out of memory. Unable to check heap for more than %"PRIuMAX
" bytes.\n",