Selecting a memory manager
The IJG code is capable of working on images that are too big to fit in main memory; data is swapped out to temporary files as necessary. However, the code to do this is rather system-dependent. We provide four different memory managers:
jmemansi.c This version uses the ANSI-standard library routine tmpfile(),
which not all non-ANSI systems have. On some systems tmpfile() may put the temporary file in a non-optimal location; if you don't like what it does, use jmemname.c.
jmemname.c This version creates named temporary files. For anything
except a Unix machine, you'll need to configure the select_file_name() routine appropriately; see the comments near the head of jmemname.c. If you use this version, define NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files are removed if the program is aborted.
jmemnobs.c (That stands for No Backing Store :-).) This will compile on
almost any system, but it assumes you have enough main memory or virtual memory to hold the biggest images you work with.
jmemdos.c This should be used with most 16-bit MS-DOS compilers.
See the system-specific notes about MS-DOS for more info. IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in jconfig.h, and include the assembly file jmemdosa.asm in the programs. The supplied makefiles and jconfig files for MS-DOS compilers already do both.
To use a particular memory manager, change the SYSDEPMEM variable in your makefile to equal the corresponding object file name (for example, jmemansi.o or jmemansi.obj for jmemansi.c).
Partager