1*0aeed3e9SJustin Hibbits /****************************************************************************** 2*0aeed3e9SJustin Hibbits 3*0aeed3e9SJustin Hibbits � 1995-2003, 2004, 2005-2011 Freescale Semiconductor, Inc. 4*0aeed3e9SJustin Hibbits All rights reserved. 5*0aeed3e9SJustin Hibbits 6*0aeed3e9SJustin Hibbits This is proprietary source code of Freescale Semiconductor Inc., 7*0aeed3e9SJustin Hibbits and its use is subject to the NetComm Device Drivers EULA. 8*0aeed3e9SJustin Hibbits The copyright notice above does not evidence any actual or intended 9*0aeed3e9SJustin Hibbits publication of such source code. 10*0aeed3e9SJustin Hibbits 11*0aeed3e9SJustin Hibbits ALTERNATIVELY, redistribution and use in source and binary forms, with 12*0aeed3e9SJustin Hibbits or without modification, are permitted provided that the following 13*0aeed3e9SJustin Hibbits conditions are met: 14*0aeed3e9SJustin Hibbits * Redistributions of source code must retain the above copyright 15*0aeed3e9SJustin Hibbits notice, this list of conditions and the following disclaimer. 16*0aeed3e9SJustin Hibbits * Redistributions in binary form must reproduce the above copyright 17*0aeed3e9SJustin Hibbits notice, this list of conditions and the following disclaimer in the 18*0aeed3e9SJustin Hibbits documentation and/or other materials provided with the distribution. 19*0aeed3e9SJustin Hibbits * Neither the name of Freescale Semiconductor nor the 20*0aeed3e9SJustin Hibbits names of its contributors may be used to endorse or promote products 21*0aeed3e9SJustin Hibbits derived from this software without specific prior written permission. 22*0aeed3e9SJustin Hibbits 23*0aeed3e9SJustin Hibbits THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY 24*0aeed3e9SJustin Hibbits EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 25*0aeed3e9SJustin Hibbits WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26*0aeed3e9SJustin Hibbits DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY 27*0aeed3e9SJustin Hibbits DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28*0aeed3e9SJustin Hibbits (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29*0aeed3e9SJustin Hibbits LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 30*0aeed3e9SJustin Hibbits ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31*0aeed3e9SJustin Hibbits (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32*0aeed3e9SJustin Hibbits SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33*0aeed3e9SJustin Hibbits * 34*0aeed3e9SJustin Hibbits 35*0aeed3e9SJustin Hibbits **************************************************************************/ 36*0aeed3e9SJustin Hibbits #ifndef __MEM_H 37*0aeed3e9SJustin Hibbits #define __MEM_H 38*0aeed3e9SJustin Hibbits 39*0aeed3e9SJustin Hibbits #include "error_ext.h" 40*0aeed3e9SJustin Hibbits #include "std_ext.h" 41*0aeed3e9SJustin Hibbits #include "list_ext.h" 42*0aeed3e9SJustin Hibbits 43*0aeed3e9SJustin Hibbits 44*0aeed3e9SJustin Hibbits #define __ERR_MODULE__ MODULE_MEM 45*0aeed3e9SJustin Hibbits 46*0aeed3e9SJustin Hibbits 47*0aeed3e9SJustin Hibbits 48*0aeed3e9SJustin Hibbits 49*0aeed3e9SJustin Hibbits /**************************************************************************//** 50*0aeed3e9SJustin Hibbits @Description Memory allocation owner. 51*0aeed3e9SJustin Hibbits *//***************************************************************************/ 52*0aeed3e9SJustin Hibbits typedef enum e_MemAllocOwner 53*0aeed3e9SJustin Hibbits { 54*0aeed3e9SJustin Hibbits e_MEM_ALLOC_OWNER_LOCAL, 55*0aeed3e9SJustin Hibbits e_MEM_ALLOC_OWNER_LOCAL_SMART, 56*0aeed3e9SJustin Hibbits e_MEM_ALLOC_OWNER_EXTERNAL 57*0aeed3e9SJustin Hibbits } e_MemAllocOwner; 58*0aeed3e9SJustin Hibbits 59*0aeed3e9SJustin Hibbits 60*0aeed3e9SJustin Hibbits #ifdef DEBUG_MEM_LEAKS 61*0aeed3e9SJustin Hibbits 62*0aeed3e9SJustin Hibbits /**************************************************************************//** 63*0aeed3e9SJustin Hibbits @Description MEM block information for leaks detection. 64*0aeed3e9SJustin Hibbits *//***************************************************************************/ 65*0aeed3e9SJustin Hibbits typedef struct t_MemDbg 66*0aeed3e9SJustin Hibbits { 67*0aeed3e9SJustin Hibbits uintptr_t ownerAddress; 68*0aeed3e9SJustin Hibbits 69*0aeed3e9SJustin Hibbits } t_MemDbg; 70*0aeed3e9SJustin Hibbits 71*0aeed3e9SJustin Hibbits #endif /* DEBUG_MEM_LEAKS */ 72*0aeed3e9SJustin Hibbits 73*0aeed3e9SJustin Hibbits 74*0aeed3e9SJustin Hibbits #endif /* __MEM_H */ 75