User`s manual
PC2-CamLink User's Manual Part I: PC2-CamLink Board • 13
Increasing Contiguous Memory for Sapera Resources
The Contiguous Memory section lets the user specify the total amount of contiguous memory (a
block of physical memory occupying consecutive addresses) reserved for the resources needed for
Sapera buffer allocation and Sapera messaging. For both items, the Requested value dialog box
shows the default driver memory setting while the Allocated value displays the amount of contiguous
memory that has been allocated successfully. The default values will generally satisfy the needs of
most applications.
The Sapera buffer values determine the total amount of contiguous memory reserved at boot time for
the allocation of dynamic resources used for host frame buffer management, such as DMA descriptor
tables as well as other kernel needs. Adjust this value higher if your application generates any out-of-
memory error while allocating host frame buffers. You can approximate the amount of contiguous
memory required as follows:
• Calculate the total amount of host memory used for frame buffers
( number of frame buffers • number of pixels per line • number of lines • (2 - if buffer
is 10 or 12 bits) ).
• Provide 1MB for every 256MB of host frame buffer memory required.
• Add an additional 1MB if the frame buffers have a short line length, e.g., 1k or less
(increased number of individual frame buffers requires more resources).
• Add an additional 2MB for various static and dynamic Sapera resources.
• Test for any memory error when allocating host buffers. Simply select the Buffer button in the
‘General Options’ section of the “
Grab Demo Main Window” (see page 95) of the Sapera Grab
Demo program to open the Buffer window (see “
Using the Grab Demo” on page 94) to allocate
the number of host buffers required for your acquisition source. Feel free to test the maximum
host buffer limit possible in your host system—Grab Demo will not crash when the requested
number of host frame buffers cannot be allocated.