APPX Software Library

Appendix E: APPX Environment Variables

Debugging - Memory Variables

APPX_CHECK_MEM

Causes APPX to periodically pause and verify its allocated memory, in an attempt to narrow down the source of memory corruption. This process is very CPU-intensive, and will noticeably slow your APPX session. Therefore, do not use this variable unless specifically requested by APPX Software.

Valid values: 1

Default value: not set

APPX_RUN_MEM

Overrides the amount of memory APPX will use for an in-memory query. Above this value, APPX will switch to a disk-based sort, which is less efficient. You may want to increase the default value if queries that run well with a small number of records slow noticeably when the number of records increases.

Valid values: maximum number of bytes to use for an in-memory query sort

Default value: 256K on Unix, 64K on Windows

APPX_TRAILER_COUNT

Tells APPX to append additional trailer bytes to each memory allocation. These bytes are filled with known values that are later checked for corruption when the memory is given back to the system. They can be used to find out if APPX is writing beyond the end of an allocated chunk of memory, or if memory is being corrupted for some other reason. If you set APPX_TRAILER_COUNT and memory corruption is detected, you will receive an “mm.c.876 mm_free() – corrupted” error message as soon as the corruption is detected. This variable may introduce a small amount of additional memory overhead.

It is also useful to set this variable if you are receiving other “mm.c” error messages, because it may detect the source of memory corruption before the other error message occurs, and thus provide better debugging hints. This variable can also provide information for “.stk” stack dumps, if they are enabled on your system.

Valid values: integers

Default value: 0