00001 00012 /* 00013 * ============================================================================ 00014 * 00015 * Copyright (c) 2008-2012, Texas Instruments Incorporated 00016 * 00017 * Redistribution and use in source and binary forms, with or without 00018 * modification, are permitted provided that the following conditions 00019 * are met: 00020 * 00021 * * Redistributions of source code must retain the above copyright 00022 * notice, this list of conditions and the following disclaimer. 00023 * 00024 * * Redistributions in binary form must reproduce the above copyright 00025 * notice, this list of conditions and the following disclaimer in the 00026 * documentation and/or other materials provided with the distribution. 00027 * 00028 * * Neither the name of Texas Instruments Incorporated nor the names of 00029 * its contributors may be used to endorse or promote products derived 00030 * from this software without specific prior written permission. 00031 * 00032 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00033 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00034 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00035 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00036 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00037 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00038 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00039 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00040 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00041 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00042 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00043 * Contact information for paper mail: 00044 * Texas Instruments 00045 * Post Office Box 655303 00046 * Dallas, Texas 75265 00047 * Contact information: 00048 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? 00049 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact 00050 * ============================================================================ 00051 * 00052 */ 00053 00054 00055 00056 #ifndef MEMORY_H_0xC97E 00057 #define MEMORY_H_0xC97E 00058 00059 00060 /*------------------------- OSAL and utils ----------------------------- */ 00061 #include <ti/syslink/utils/MemoryDefs.h> 00062 #include <ti/syslink/utils/MemoryOS.h> 00063 #include <ti/syslink/utils/_Memory.h> 00064 00065 /* Module headers */ 00066 #include <ti/syslink/utils/IHeap.h> 00067 00068 00069 #if defined (__cplusplus) 00070 extern "C" { 00071 #endif 00072 00073 00074 /* ============================================================================= 00075 * Macros 00076 * ============================================================================= 00077 */ 00083 #define Memory_Q_BLOCKING 1 00084 00085 /* ============================================================================= 00086 * Structures & Enums. See MemoryDefs.h 00087 * ============================================================================= 00088 */ 00089 00090 /* ============================================================================= 00091 * APIs 00092 * ============================================================================= 00093 */ 00108 Ptr Memory_alloc (IHeap_Handle heap, SizeT size, SizeT align, Ptr eb); 00109 00125 Ptr Memory_calloc (IHeap_Handle heap, SizeT size, SizeT align, Ptr eb); 00126 00136 Void Memory_free (IHeap_Handle heap, Ptr block, SizeT size); 00137 00146 Void Memory_getStats (IHeap_Handle heap, Memory_Stats * stats); 00147 00156 Bool Memory_query (IHeap_Handle heap, Int qual); 00157 00163 SizeT Memory_getMaxDefaultTypeAlign (Void); 00164 00181 Ptr Memory_valloc (IHeap_Handle heap, 00182 SizeT size, 00183 SizeT align, 00184 Char value, 00185 Ptr eb); 00186 00187 00188 /* ============================================================================= 00189 * APIs that are added for MemoryOS 00190 * ============================================================================= 00191 */ 00192 00196 #define Memory_copy MemoryOS_copy 00197 00201 #define Memory_set MemoryOS_set 00202 00203 00204 #if defined (__cplusplus) 00205 } 00206 #endif /* defined (__cplusplus) */ 00207 00208 #endif /* ifndef MEMORY_H_0xC97E */