--max-ifd [ErminePro] [3.1.1]

This switch allows to specify maximum file descritor available for internal (packaged) file.

By default Ermine reserves space for 1024 internal file desciptors, i.e. internal file descriptor can be in the range [0..1023].

Usually all packaged files opened at application start up, so even if application uses a lot of file descriptors default 1024 should be enough.

So when --max-ifd switch should be used?

First, when packaged application aborted with error message like that:

app.ermine: fd_meta_index_set: fd=1057 is not less then limit max_ifd=1024 or negative. Execution aborted.

Obviously, the only way to make this application works is to re-pack it with bigger --max-ifd.

Second, when one wanted to save a bit of memory. To keep each internal file descriptor 2 long int required. Default 1024 internal file descriptors will use 8K (2 pages) on i386 system and 16K (4 pages) on x86-64. 1 page on i386 or up to 3 pages on x86-64 may be saved by specifying smaller value for --max-ifd


Memory for internal file descriptors allocated in whole pages, so --max-fd=5 and --max-fd=256 will result in the same memory usage.