• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>oscl_mem_basic_functions.h Source File</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5</head><body>
6<!-- Generated by Doxygen 1.2.18 -->
7<center>
8<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>
9<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>
1000002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
1100003
1200004 <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>
1300005
1400006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
1500007
1600018 <span class="preprocessor">#ifndef OSCL_MEM_BASIC_FUNCTIONS_H</span>
1700019 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MEM_BASIC_FUNCTIONS_H</span>
1800020 <span class="preprocessor"></span>
1900021 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span>
2000022 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html">oscl_base.h</a>"</span>
2100023 <span class="preprocessor">#endif</span>
2200024 <span class="preprocessor"></span>
2300025 <span class="comment">/*</span>
2400026 <span class="comment"> * Note: the public oscl_malloc call has been deprecated.  This</span>
2500027 <span class="comment"> * function is for internal use by Oscl code only.  Higher level</span>
2600028 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_MALLOC.</span>
2700029 <span class="comment"> *</span>
2800030 <span class="comment"> * Allocates a memory block.</span>
2900031 <span class="comment"> *</span>
3000032 <span class="comment"> * @param count  number of bytes to allocate</span>
3100033 <span class="comment"> *</span>
3200034 <span class="comment"> * @return a void pointer to the allocated space, or NULL if there is insufficient</span>
3300035 <span class="comment"> *         memory available.</span>
3400036 <span class="comment"> */</span>
3500037 <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);
3600038
3700039 <span class="comment">/*</span>
3800040 <span class="comment"> * Note: the public oscl_calloc call has been deprecated.  This</span>
3900041 <span class="comment"> * function is for internal use by Oscl code only.  Higher level</span>
4000042 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_CALLOC.</span>
4100043 <span class="comment"> *</span>
4200044 <span class="comment"> *</span>
4300045 <span class="comment"> * Allocates a memory block and fills with zeros.</span>
4400046 <span class="comment"> *</span>
4500047 <span class="comment"> *</span>
4600048 <span class="comment"> * @param nelems  number of elements of size bytes to allocate.</span>
4700049 <span class="comment"> * @param size    the size in bytes of each element</span>
4800050 <span class="comment"> *</span>
4900051 <span class="comment"> * the total space allocated = nelems * size  bytes.</span>
5000052 <span class="comment"> *</span>
5100053 <span class="comment"> * @return a void pointer to the allocated space, or NULL if there is insufficient</span>
5200054 <span class="comment"> *         memory available.</span>
5300055 <span class="comment"> */</span>
5400056 <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);
5500057
5600058
5700059 <span class="comment">/*</span>
5800060 <span class="comment"> * Note: the public oscl_realloc call has been deprecated.  This</span>
5900061 <span class="comment"> * function is for internal use by Oscl code only.  Higher level</span>
6000062 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_REALLOC.</span>
6100063 <span class="comment"> *</span>
6200064 <span class="comment"> *</span>
6300065 <span class="comment"> * Reallocates a memory block</span>
6400066 <span class="comment"> * If src is NULL, realloc behaves the same way as oscl_malloc and allocates a new</span>
6500067 <span class="comment"> * block of size count.</span>
6600068 <span class="comment"> *</span>
6700069 <span class="comment"> * @param src    pointer to previously allocated memory block</span>
6800070 <span class="comment"> * @param count  number of bytes to allocate</span>
6900071 <span class="comment"> *</span>
7000072 <span class="comment"> * @return a void pointer to the reallocated (and possibly moved) memory block. The</span>
7100073 <span class="comment"> *         return value is NULL if the size is zero and the buffer argument is not NULL,</span>
7200074 <span class="comment"> *         or if there is not enough available memory to expand the block to the given</span>
7300075 <span class="comment"> *         size.</span>
7400076 <span class="comment"> */</span>
7500077 <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);
7600078
7700079 <span class="comment">/*</span>
7800080 <span class="comment"> * Note: the public oscl_free call has been deprecated.  This</span>
7900081 <span class="comment"> * function is for internal use by Oscl code only.  Higher level</span>
8000082 <span class="comment"> * code should include "oscl_mem.h" and use OSCL_FREE.</span>
8100083 <span class="comment"> *</span>
8200084 <span class="comment"> *</span>
8300085 <span class="comment"> * Deallocates or frees a memory block</span>
8400086 <span class="comment"> *</span>
8500087 <span class="comment"> * @param src    pointer to previously allocated memory block</span>
8600088 <span class="comment"> *</span>
8700089 <span class="comment"> * @return</span>
8800090 <span class="comment"> */</span>
8900091 <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);
9000092
9100106 <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);
9200107
9300121 <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);
9400122
9500133 <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);
9600134
9700144 <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);
9800145
9900157 <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);
10000158
10100159
10200160 <span class="preprocessor">#if (!OSCL_DISABLE_INLINES)</span>
10300161 <span class="preprocessor"></span><span class="preprocessor">#include "oscl_mem_basic_functions.inl"</span>
10400162 <span class="preprocessor">#endif</span>
10500163 <span class="preprocessor"></span>
10600164 <span class="preprocessor">#endif</span>
10700165 <span class="preprocessor"></span>
108</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
109<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
110</small></address>
111</body>
112</html>
113