1ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson/*
2ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* Copyright (c) 2011, The Linux Foundation. All rights reserved.
3ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*
4ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* Redistribution and use in source and binary forms, with or without
5ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* modification, are permitted provided that the following conditions are
6ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* met:
7ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*    * Redistributions of source code must retain the above copyright
8ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*      notice, this list of conditions and the following disclaimer.
9ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*    * Redistributions in binary form must reproduce the above
10ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*      copyright notice, this list of conditions and the following
11ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*      disclaimer in the documentation and/or other materials provided
12ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*      with the distribution.
13ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*    * Neither the name of The Linux Foundation nor the names of its
14ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*      contributors may be used to endorse or promote products derived
15ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*      from this software without specific prior written permission.
16ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*
17ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*/
29ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
30ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
31ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#ifndef OVERLAY_MEM_H
32ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#define OVERLAY_MEM_H
33ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
34ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include <sys/mman.h>
35ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include <fcntl.h>
36ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include <alloc_controller.h>
37ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include <memalloc.h>
38ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
39ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include "gralloc_priv.h"
40ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include "overlayUtils.h"
41a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#define SIZE_1M 0x00100000
42ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
43ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonnamespace overlay {
44ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
45ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson/*
46ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* Holds base address, offset and the fd
47ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* */
48ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonclass OvMem {
49ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonpublic:
50ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* ctor init*/
51ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    explicit OvMem();
52ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
53ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* dtor DO NOT call close so it can be copied */
54ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    ~OvMem();
55ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
56ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* Use libgralloc to retrieve fd, base addr, alloc type */
57ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    bool open(uint32_t numbufs,
58ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson            uint32_t bufSz, bool isSecure);
59ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
60ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* close fd. assign base address to invalid*/
61ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    bool close();
62ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
63ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* return underlying fd */
64ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    int getFD() const;
65ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
66ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* return true if fd is valid and base address is valid */
67ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    bool valid() const;
68ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
69ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* dump the state of the object */
70ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    void dump() const;
71ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
72ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* return underlying address */
73ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    void* addr() const;
74ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
75ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* return underlying offset */
76ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    uint32_t bufSz() const;
77ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
78ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* return number of bufs */
79ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    uint32_t numBufs() const ;
80ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
81ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonprivate:
82ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* actual os fd */
83ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    int mFd;
84ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
85ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* points to base addr (mmap)*/
86ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    void* mBaseAddr;
87ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
88ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* allocated buffer type determined by gralloc (ashmem, ion, etc) */
89ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    int mAllocType;
90ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
91a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    /* holds buf size sent down by the client */
92ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    uint32_t mBufSz;
93ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
94ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* num of bufs */
95ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    uint32_t mNumBuffers;
96ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
97ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    /* gralloc alloc controller */
98ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    gralloc::IAllocController* mAlloc;
99a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson
100a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    /*Holds the aligned buffer size used for actual allocation*/
101a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    uint32_t mBufSzAligned;
102ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson};
103ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
104ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson//-------------------Inlines-----------------------------------
105ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
106ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonusing gralloc::IMemAlloc;
107ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonusing gralloc::alloc_data;
108ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
109ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline OvMem::OvMem() {
110ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mFd = -1;
111ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mBaseAddr = MAP_FAILED;
112ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mAllocType = 0;
113ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mBufSz = 0;
114ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mNumBuffers = 0;
115ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mAlloc = gralloc::IAllocController::getInstance();
116ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
117ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
118ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline OvMem::~OvMem() { }
119ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
120ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool OvMem::open(uint32_t numbufs,
121ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        uint32_t bufSz, bool isSecure)
122ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
123ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    alloc_data data;
124ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    int allocFlags = GRALLOC_USAGE_PRIVATE_IOMMU_HEAP;
125a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    int err = 0;
126a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    OVASSERT(numbufs && bufSz, "numbufs=%d bufSz=%d", numbufs, bufSz);
127a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    mBufSz = bufSz;
128a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson
129ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    if(isSecure) {
130ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        allocFlags = GRALLOC_USAGE_PRIVATE_MM_HEAP;
131ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        allocFlags |= GRALLOC_USAGE_PROTECTED;
132a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson        mBufSzAligned = utils::align(bufSz, SIZE_1M);
133a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson        data.align = SIZE_1M;
134a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    } else {
135a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson        mBufSzAligned = bufSz;
136a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson        data.align = getpagesize();
137ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    }
138a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson
139ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    // Allocate uncached rotator buffers
140ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    allocFlags |= GRALLOC_USAGE_PRIVATE_UNCACHED;
141ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
142ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mNumBuffers = numbufs;
143ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
144ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    data.base = 0;
145ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    data.fd = -1;
146ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    data.offset = 0;
147a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    data.size = mBufSzAligned * mNumBuffers;
148ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    data.uncached = true;
149ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
150ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    err = mAlloc->allocate(data, allocFlags);
151ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    if (err != 0) {
152ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        ALOGE("OvMem: Error allocating memory");
153ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        return false;
154ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    }
155ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
156ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mFd = data.fd;
157ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mBaseAddr = data.base;
158ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mAllocType = data.allocType;
159ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
160ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    return true;
161ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
162ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
163ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool OvMem::close()
164ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
165ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    int ret = 0;
166ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
167ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    if(!valid()) {
168ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        return true;
169ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    }
170ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
171ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    IMemAlloc* memalloc = mAlloc->getAllocator(mAllocType);
172a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    ret = memalloc->free_buffer(mBaseAddr, mBufSzAligned * mNumBuffers, 0, mFd);
173ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    if (ret != 0) {
174ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        ALOGE("OvMem: error freeing buffer");
175ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson        return false;
176ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    }
177ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
178ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mFd = -1;
179ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mBaseAddr = MAP_FAILED;
180ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mAllocType = 0;
181ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mBufSz = 0;
182a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    mBufSzAligned = 0;
183ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    mNumBuffers = 0;
184ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    return true;
185ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
186ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
187ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool OvMem::valid() const
188ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
189ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    return (mFd != -1) && (mBaseAddr != MAP_FAILED);
190ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
191ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
192ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline int OvMem::getFD() const
193ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
194ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    return mFd;
195ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
196ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
197ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void* OvMem::addr() const
198ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
199ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    return mBaseAddr;
200ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
201ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
202ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline uint32_t OvMem::bufSz() const
203ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
204ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    return mBufSz;
205ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
206ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
207ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline uint32_t OvMem::numBufs() const
208ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
209ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    return mNumBuffers;
210ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
211ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
212ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void OvMem::dump() const
213ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson{
214ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    ALOGE("== Dump OvMem start ==");
215a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson    ALOGE("fd=%d addr=%p type=%d bufsz=%u AlignedBufSz=%u",
216a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson           mFd, mBaseAddr, mAllocType, mBufSz, mBufSzAligned);
217ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson    ALOGE("== Dump OvMem end ==");
218ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}
219ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
220ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} // overlay
221ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson
222ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#endif // OVERLAY_MEM_H
223