Skip to main content
Skip table of contents

(v13) SWMemCfgTag

This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP

SWMemCfgTag has a value that points to a structure of the following type:

TEXT
                      typedef struct {
                      size_t maxAddrSpaceSize; /* Address range RIP may use, and max it may grow to */
                      size_t workingSize; /* Normal working size to restrict RIP to */
                      size_t emergencySize; /* Additional mem to use rather than partial paint */
                      int32 allowUseAllMem; /* Allow usage of mem up to max (after trying to
                                          /* partial paint) rather than fail */
  mps_arena_t arena; /* The memory arena */
                      } SWSTART_MEMCFG;

The arena should be an MPS virtual non-zoned arena, that is, of arena class mps_arena_class_vmnz() .

If the workingSize option is not used, the RIP is allocated all the available physical memory, less any Operating System reserve.

workingSize will not include skin allocations, such as printer buffers, and any Operating System reserve would be subtracted first. So workingSize is the actual amount of memory that the core RIP should use as a maximum.

If a particular job is so large that it cannot all be fitted into memory at once, the RIP starts to paint partial page buffers to disk. To avoid painting partial page buffers to disk the emergencySize option can allocate extra temporary memory for the RIP. In instances when the RIP cannot paint partial page buffers to disk, such as when recombining, use the allowUseAllMem option. The RIP will use all the available physical and virtual memory to try and complete the job. Be aware, however, that using all the memory may severely degrade performance until the job has finished.

NOTE:   If you allocate a large amount of extra temporary memory, the operating system may start paging. Paging would slow the system down more than painting partial page buffers to disk. It is recommended that you allocate less than 4 MiB of extra temporary memory.

workingSize and emergencySize are in bytes, and allowUseAllMem is a Boolean flag.

maxAddrSpaceSize specifies the size of the address space available to the RIP in bytes. Having a large address space allows the RIP to position its allocations more efficiently, so this value should be as large as possible, near the limit of what the Operating System allows for a user application. This is normally what limits the RIPs ability to use memory. Note that the core RIP will reserve this much address space, leaving no place for other

allocations, if you specify the Operating System limit or more. So you should aim for the Operating System limit minus the size of the application, minus any skin allocations (not done through SwAlloc ), minus any allocations by libraries linked into your application.

NOTE: All memory handling in skintest and skinkit should use the routines provided by mem.h, that is, MemAlloc() and MemFree().

On Windows, the deductions typically amount to 130 MiB. If you need to verify that your setting is safe, run a large job that will require all the available memory (with workingSize set to equal maxAddrSpaceSize , so that it really will use that much), and then check that you can still malloc in the skin (or create new threads, or whatever process it is that your application needs to be able to do).

For more information on memory allocations please consult the RIP installation guides for the relevant platform/OS combination.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.