📄 smmemlib.html
字号:
<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if access to the shared memory system partition fails.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_smObjLib_LOCK_TIMEOUT</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smMemLib.html#top">smMemLib</a></b><hr><a name="smMemOptionsSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smMemOptionsSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smMemOptionsSet( )</strong> - set debug options for shared memory system partition (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS smMemOptionsSet ( unsigned options /* options for system partition */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the debug options for the shared system memory partition.Two kinds of errors are detected: attempts to allocate more memory thanis available, and bad blocks found when memory is freed or reallocated. In both cases, the following options can be selected for actions to be taken when an error is detected: (1) return the error status, (2) log an error message and return the error status, or (3) log an error message and suspend the calling task. These options are discussed in detail in the library manual entry for <b><a href="./smMemLib.html#top">smMemLib</a></b>.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_smObjLib_LOCK_TIMEOUT</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smMemLib.html#top">smMemLib</a></b><hr><a name="smMemMalloc"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smMemMalloc( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smMemMalloc( )</strong> - allocate block of memory from shared memory system partition (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * smMemMalloc ( unsigned nBytes /* number of bytes to allocate */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allocates a block of memory from the shared memory system partition whose size is equal to or greater than <i>nBytes</i>.The return value is the local address of the allocated shared memory block.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the block, or NULL if the memory cannot be allocated.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_memLib_NOT_ENOUGH_MEMORY</b><br> <b>S_smObjLib_LOCK_TIMEOUT</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smMemLib.html#top">smMemLib</a></b><hr><a name="smMemCalloc"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smMemCalloc( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smMemCalloc( )</strong> - allocate memory for array from shared memory system partition (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * smMemCalloc ( int elemNum, /* number of elements */ int elemSize /* size of elements */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allocates a block of memory for an array that contains<i>elemNum</i> elements of size <i>elemSize</i> from the shared memory system partition.The return value is the local address of the allocated shared memory block.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the block, or NULL if the memory cannot be allocated.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_memLib_NOT_ENOUGH_MEMORY</b><br> <b>S_smObjLib_LOCK_TIMEOUT</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smMemLib.html#top">smMemLib</a></b><hr><a name="smMemRealloc"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smMemRealloc( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smMemRealloc( )</strong> - reallocate block of memory from shared memory system partition (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * smMemRealloc ( void * pBlock, /* block to be reallocated */ unsigned newSize /* new block size */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine changes the size of a specified block and returns a pointer tothe new block of shared memory. The contents that fit inside the new size (or old size, if smaller) remain unchanged.The return value is the local address of the reallocated shared memory block.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the new block of memory, or NULL if the reallocation cannotbe completed.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_memLib_NOT_ENOUGH_MEMORY</b><br> <b>S_memLib_BLOCK_ERROR</b><br> <b>S_smObjLib_LOCK_TIMEOUT</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smMemLib.html#top">smMemLib</a></b><hr><a name="smMemFree"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smMemFree( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smMemFree( )</strong> - free a shared memory system partition block of memory (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS smMemFree ( void * ptr /* pointer to block of memory to be freed */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes a block of memory previously allocated with <b><a href="./smMemLib.html#smMemMalloc">smMemMalloc</a>( )</b> or <b><a href="./smMemLib.html#smMemCalloc">smMemCalloc</a>( )</b> and returns it to the free shared memory system pool.<p>It is an error to free a block of memory that was not previously allocated.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the block is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_memLib_BLOCK_ERROR</b><br> <b>S_smObjLib_LOCK_TIMEOUT</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smMemLib.html#top">smMemLib</a></b>, <b><a href="./smMemLib.html#smMemMalloc">smMemMalloc</a>( )</b>, <b><a href="./smMemLib.html#smMemCalloc">smMemCalloc</a>( )</b><hr><a name="smMemFindMax"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smMemFindMax( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smMemFindMax( )</strong> - find largest free block in shared memory system partition (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int smMemFindMax (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine searches for the largest block in the shared memory system partition free list and returns its size.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>The size (in bytes) of the largest available block, or ERROR ifthe attempt to access the partition fails.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_smObjLib_LOCK_TIMEOUT</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smMemLib.html#top">smMemLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -