2 ** Copyright 2003-2010, VisualOn, Inc.
\r
4 ** Licensed under the Apache License, Version 2.0 (the "License");
\r
5 ** you may not use this file except in compliance with the License.
\r
6 ** You may obtain a copy of the License at
\r
8 ** http://www.apache.org/licenses/LICENSE-2.0
\r
10 ** Unless required by applicable law or agreed to in writing, software
\r
11 ** distributed under the License is distributed on an "AS IS" BASIS,
\r
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 ** See the License for the specific language governing permissions and
\r
14 ** limitations under the License.
\r
16 /*******************************************************************************
\r
19 Content: memory operator implementation header file
\r
21 *******************************************************************************/
\r
23 #ifndef __cmnMemory_H__
\r
24 #define __cmnMemory_H__
\r
28 #endif /* __cplusplus */
\r
32 //extern VO_MEM_OPERATOR g_memOP;
\r
36 * \param uID [in] module ID
\r
37 * \param uSize [in] size of memory
\r
38 * \return value is the allocated memory address. NULL is failed.
\r
40 VO_U32 cmnMemAlloc (VO_S32 uID, VO_MEM_INFO * pMemInfo);
\r
44 * \param uID [in] module ID
\r
45 * \param pMem [in] address of memory
\r
46 * \return value 0, if succeeded.
\r
48 VO_U32 cmnMemFree (VO_S32 uID, VO_PTR pBuffer);
\r
51 * memory set function
\r
52 * \param uID [in] module ID
\r
53 * \param pBuff [in/out] address of memory
\r
54 * \param uValue [in] the value to be set
\r
55 * \param uSize [in] the size to be set
\r
56 * \return value 0, if succeeded.
\r
58 VO_U32 cmnMemSet (VO_S32 uID, VO_PTR pBuff, VO_U8 uValue, VO_U32 uSize);
\r
61 * memory copy function
\r
62 * \param uID [in] module ID
\r
63 * \param pDest [in/out] address of destination memory
\r
64 * \param pSource [in] address of source memory
\r
65 * \param uSize [in] the size to be copied
\r
66 * \return value 0, if succeeded.
\r
68 VO_U32 cmnMemCopy (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize);
\r
71 * memory check function
\r
72 * \param uID [in] module ID
\r
73 * \param pBuff [in] address of buffer to be checked
\r
74 * \param uSize [in] the size to be checked
\r
75 * \return value 0, if succeeded.
\r
77 VO_U32 cmnMemCheck (VO_S32 uID, VO_PTR pBuffer, VO_U32 uSize);
\r
80 * memory compare function
\r
81 * \param uID [in] module ID
\r
82 * \param pBuffer1 [in] address of buffer 1 to be compared
\r
83 * \param pBuffer2 [in] address of buffer 2 to be compared
\r
84 * \param uSize [in] the size to be compared
\r
85 * \return value: same as standard C run-time memcmp() function.
\r
87 VO_S32 cmnMemCompare (VO_S32 uID, VO_PTR pBuffer1, VO_PTR pBuffer2, VO_U32 uSize);
\r
90 * memory move function
\r
91 * \param uID [in] module ID
\r
92 * \param pDest [in/out] address of destination memory
\r
93 * \param pSource [in] address of source memory
\r
94 * \param uSize [in] the size to be moved
\r
95 * \return value 0, if succeeded.
\r
97 VO_U32 cmnMemMove (VO_S32 uID, VO_PTR pDest, VO_PTR pSource, VO_U32 uSize);
\r
102 #endif /* __cplusplus */
\r
104 #endif // __cmnMemory_H__
\r