20 Installing the X64-AN Quad X64-AN Quad User's ManualIncreasing Contiguous Memory for Sapera ResourcesThe Contiguous Memory section lets the user specify the total amount of contiguous memory (ablock of physical memory occupying consecutive addresses) reserved for the resources needed forSapera buffers allocation and Sapera messaging. For both items, the Requested value dialog boxshows the driver default memory setting while the Allocated value displays the amount of contiguousmemory that has been allocated successfully. The default values will generally satisfy the needs ofmost applications.The Sapera buffers value determines the total amount of contiguous memory reserved at boot time forthe allocation of dynamic resources used for frame buffer management, such as the scatter-gather list,DMA descriptor tables, plus other kernel needs. Adjust this value higher if your application generatesany out-of-memory error while allocating host frame buffers or when connecting the buffers via atransfer object. 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 256 MB of frame buffer memory required. Add an additional 1 MB if the frame buffers have a short line length, say 1k or less( the increased number of individual frame buffers requires more resources ). Add an additional 2 MB for various static and dynamic Sapera resources. Add the amount of memory needed for DMA tables using the formula (Sapera 7.10 and up):[number of frame buffers • number of lines • 16 • (line length in bytes / 4kB)]. Test for any memory error when allocating host buffers. Simply use the Buffer menu of theSapera Grab demo program (see “Using the Grab Demo” on page 96) to allocate the number of hostbuffers required for your acquisition source. Feel free to test the maximum limit of host bufferspossible on your host system – the Sapera Grab demo will not crash when the requested number ofhost frame buffers is not allocated.Host Computer Frame Buffer Memory LimitationsWhen planning a Sapera application and its host frame buffers used, as well as other Sapera memoryresources, do not forget the Windows operating system memory needs.A Sapera application using the preferred scatter gather buffers could consume most of the remainingsystem memory, with a large allocation of frame buffers. If using frame buffers allocated as a singlecontiguous memory block, Windows will limit the allocation dependent on the installed systemmemory. Use the Buffer menu of the Sapera Grab demo program to allocate host buffer memory untilan error message signals the limit allowed by the operating system used.Contiguous Memory for Sapera MessagingThe current value for Sapera messaging determines the total amount of contiguous memory reservedat boot time for message allocation. This memory space is used to store arguments when a Saperafunction is called. Increase this value if you are using functions with large arguments, such as arraysand when experiencing any memory errors.