| NORSYS SOFTWARE © 2012 | NETICA API | C VERSION 5.04

double LimitMemoryUsage_ns ( | double max_mem, environ_ns* env )

Call this function anytime to adjust the amount of memory that Netica is permitted to allocate for tables.

For max_mem pass the number of bytes allowed. For example, to limit memory usage to 100 Megabytes, pass 100e6.

If Netica does not have enough memory to complete an operation, it will gracefully limit its behavior, and generate an error of severity ERROR_ERR.

This function is especially useful when running on operating systems that will provide very large amounts of virtual memory. You may not want Netica to be allowed to claim such large amounts, since this can result in excessive hard-disk usage, and very slow behavior (also known as "system thrashing"). It is also useful in keeping Netica well-behaved, if it must share memory with other running programs.

The previous memory allocation limit is returned. If QUERY_ns is passed for max_mem, then the limit is returned without changing it.

Version:

Versions 2.15 and later have this function.
In versions previous to 2.26, this function was named MaxMemoryUsage_ns.