blob: 10e4474106cbc2a3d26aec15611891e93870490c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>oscl_mem_basic_functions.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>oscl_mem_basic_functions.h</h1><a href="oscl__mem__basic__functions_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/* -*- c++ -*- */</span>
00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00003
00004 <span class="comment">// O S C L _ M E M _ B A S I C _ F U N C T I O N S</span>
00005
00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00007
00018 <span class="preprocessor">#ifndef OSCL_MEM_BASIC_FUNCTIONS_H</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MEM_BASIC_FUNCTIONS_H</span>
00020 <span class="preprocessor"></span>
00021 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span>
00022 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html">oscl_base.h</a>"</span>
00023 <span class="preprocessor">#endif</span>
00024 <span class="preprocessor"></span>
00025 <span class="comment">/*</span>
00026 <span class="comment"> * Note: the public oscl_malloc call has been deprecated. This</span>
00027 <span class="comment"> * function is for internal use by Oscl code only. Higher level</span>
00028 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_MALLOC.</span>
00029 <span class="comment"> *</span>
00030 <span class="comment"> * Allocates a memory block.</span>
00031 <span class="comment"> *</span>
00032 <span class="comment"> * @param count number of bytes to allocate</span>
00033 <span class="comment"> *</span>
00034 <span class="comment"> * @return a void pointer to the allocated space, or NULL if there is insufficient</span>
00035 <span class="comment"> * memory available.</span>
00036 <span class="comment"> */</span>
00037 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="group__osclmemory.html#a7">_oscl_malloc</a>(int32 count);
00038
00039 <span class="comment">/*</span>
00040 <span class="comment"> * Note: the public oscl_calloc call has been deprecated. This</span>
00041 <span class="comment"> * function is for internal use by Oscl code only. Higher level</span>
00042 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_CALLOC.</span>
00043 <span class="comment"> *</span>
00044 <span class="comment"> *</span>
00045 <span class="comment"> * Allocates a memory block and fills with zeros.</span>
00046 <span class="comment"> *</span>
00047 <span class="comment"> *</span>
00048 <span class="comment"> * @param nelems number of elements of size bytes to allocate.</span>
00049 <span class="comment"> * @param size the size in bytes of each element</span>
00050 <span class="comment"> *</span>
00051 <span class="comment"> * the total space allocated = nelems * size bytes.</span>
00052 <span class="comment"> *</span>
00053 <span class="comment"> * @return a void pointer to the allocated space, or NULL if there is insufficient</span>
00054 <span class="comment"> * memory available.</span>
00055 <span class="comment"> */</span>
00056 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="group__osclmemory.html#a8">_oscl_calloc</a>(int32 nelems, int32 size);
00057
00058
00059 <span class="comment">/*</span>
00060 <span class="comment"> * Note: the public oscl_realloc call has been deprecated. This</span>
00061 <span class="comment"> * function is for internal use by Oscl code only. Higher level</span>
00062 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_REALLOC.</span>
00063 <span class="comment"> *</span>
00064 <span class="comment"> *</span>
00065 <span class="comment"> * Reallocates a memory block</span>
00066 <span class="comment"> * If src is NULL, realloc behaves the same way as oscl_malloc and allocates a new</span>
00067 <span class="comment"> * block of size count.</span>
00068 <span class="comment"> *</span>
00069 <span class="comment"> * @param src pointer to previously allocated memory block</span>
00070 <span class="comment"> * @param count number of bytes to allocate</span>
00071 <span class="comment"> *</span>
00072 <span class="comment"> * @return a void pointer to the reallocated (and possibly moved) memory block. The</span>
00073 <span class="comment"> * return value is NULL if the size is zero and the buffer argument is not NULL,</span>
00074 <span class="comment"> * or if there is not enough available memory to expand the block to the given</span>
00075 <span class="comment"> * size.</span>
00076 <span class="comment"> */</span>
00077 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="group__osclmemory.html#a9">_oscl_realloc</a>(<span class="keywordtype">void</span>* src, int32 count);
00078
00079 <span class="comment">/*</span>
00080 <span class="comment"> * Note: the public oscl_free call has been deprecated. This</span>
00081 <span class="comment"> * function is for internal use by Oscl code only. Higher level</span>
00082 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_FREE.</span>
00083 <span class="comment"> *</span>
00084 <span class="comment"> *</span>
00085 <span class="comment"> * Deallocates or frees a memory block</span>
00086 <span class="comment"> *</span>
00087 <span class="comment"> * @param src pointer to previously allocated memory block</span>
00088 <span class="comment"> *</span>
00089 <span class="comment"> * @return</span>
00090 <span class="comment"> */</span>
00091 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="group__osclmemory.html#a10">_oscl_free</a>(<span class="keywordtype">void</span>* src);
00092
00106 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="group__osclmemory.html#a11">oscl_memcpy</a>(<span class="keywordtype">void</span>* dest, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, uint32 count);
00107
00121 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="group__osclmemory.html#a12">oscl_memmove</a>(<span class="keywordtype">void</span>* dest, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, uint32 count);
00122
00133 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="group__osclmemory.html#a13">oscl_memmove32</a>(<span class="keywordtype">void</span>* dest, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, uint32 count);
00134
00144 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="group__osclmemory.html#a14">oscl_memset</a>(<span class="keywordtype">void</span>* dest, uint8 val, uint32 count);
00145
00157 <a class="code" href="group__osclbase.html#a84">OSCL_COND_IMPORT_REF</a> <span class="keywordtype">int</span> <a class="code" href="group__osclmemory.html#a15">oscl_memcmp</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* buf1, <span class="keyword">const</span> <span class="keywordtype">void</span>* buf2, uint32 count);
00158
00159
00160 <span class="preprocessor">#if (!OSCL_DISABLE_INLINES)</span>
00161 <span class="preprocessor"></span><span class="preprocessor">#include "oscl_mem_basic_functions.inl"</span>
00162 <span class="preprocessor">#endif</span>
00163 <span class="preprocessor"></span>
00164 <span class="preprocessor">#endif</span>
00165 <span class="preprocessor"></span>
</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>