SML# Document Version 4.1.0
28 The smlsharp command

28.7 Environment variables

The SML# compiler refers to the following environment variables:

SMLSHARP_HEAPSIZE

This gives the compiler the hint of the minimum and maximum heap size. The content of this variable must be the minimum size followed by a comma followed by the maximum size. The heap size must be a decimal integer with an optional suffix K (killo), M (mega), G (giga), or T (tera). The maximum size may be omitted. If omitted, dynamic heap expansion is disabled. The default setting is “32M:256M.” If the compiler is aborted due to memory exhaustion, increase the heap size by this environment variable.

SMLSHARP_VERBOSE

This indicates the verbose level of the SML# runtime in an integer from 0 to 5. Its default is 2. This is provided for SML# compiler developers.

SMLSHARP_LIBMYSQLCLIENT, SMLSHARP_LIBODBC, SMLSHARP_LIBPQ

These specify the database libraries that the SML# compiler uses in the interactive mode. Set them if you meet an library load error when using SQL features of SML#.