diff options
author | Mathias Agopian <mathias@google.com> | 2012-09-25 15:28:44 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-09-25 15:30:38 -0700 |
commit | 7b1905113712281c777b230648d3fbb69ae4f42c (patch) | |
tree | e465a16482c4db5b577e95771982c230d2c8623d /include | |
parent | bb53b0e4b97634bc31808965f81b3ab4193d0e84 (diff) | |
download | frameworks_native-7b1905113712281c777b230648d3fbb69ae4f42c.zip frameworks_native-7b1905113712281c777b230648d3fbb69ae4f42c.tar.gz frameworks_native-7b1905113712281c777b230648d3fbb69ae4f42c.tar.bz2 |
fix a crasher when running out of memory
MemoryHeapBase::getBase() returns MAP_FAILED in case or
OOM, not null which is what SF was checking against.
This addresses one of the issues of bug 7230543.
Bug: 7230543
Change-Id: I763a88f64a2f9ff75eb139cfbaf9a1a9746c5577
Diffstat (limited to 'include')
-rw-r--r-- | include/binder/MemoryHeapBase.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/binder/MemoryHeapBase.h b/include/binder/MemoryHeapBase.h index bbbda9c..ea9b66c 100644 --- a/include/binder/MemoryHeapBase.h +++ b/include/binder/MemoryHeapBase.h @@ -58,10 +58,13 @@ public: /* implement IMemoryHeap interface */ virtual int getHeapID() const; + + /* virtual address of the heap. returns MAP_FAILED in case of error */ virtual void* getBase() const; + virtual size_t getSize() const; virtual uint32_t getFlags() const; - virtual uint32_t getOffset() const; + virtual uint32_t getOffset() const; const char* getDevice() const; |