Skip to main content
Skip table of contents

(v13) SwLeMemInit() and SwLeStart()

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

There are two other API functions that require parameters to configure the RIP's memory behavior. SwLeMemInit() and SwLeStart() are both passed the same RIP_maxAddressSpaceInBytes, RIP_workingSizeInBytes , and pMemory parameters set by or provided to SwLeSDKStart() .

The latter of these functions, SwLeStart() , is the function that starts the RIP, and so it will always be called. The former function, SwLeMemInit() , is optional. The first of these two functions to be called sets the parameters that will be used by the RIP; if SwLeMemInit() is called, the memory-related parameters to the SwLeStart() call are ignored.

Both of these functions also take the parameter RIP_emergencySizeInBytes . This parameter is only relevant when the RIP is configured to use virtual memory. The amount of physical memory the RIP is allowed to use (RIP_workingSizeInBytes) is divided into two parts, by subtracting the emergency size from the supplied working size. The RIP will allocate memory up to this new lower working size without penalty. Upon reaching this limit, the RIP will run through its low-memory strategies (such as flushing caches, paging data to disk if possible).

Memory allocations are allowed to extend the total allocated memory into the emergency memory size as one of the final low-memory actions. The RIP will continue to perform low-memory actions until the amount of allocated memory falls below the new lower working size, and the RIP can release memory back to the operating system. Performance of the RIP will be negatively affected while it is using more than the lower working set size.

The emergency size should be set to a small fraction of the RIP_workingSizeInBytes parameter. The SDK normally defaults it to a fixed 5 MB allocation.

JavaScript errors detected

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

If this problem persists, please contact our support.