From cbf3726357966539c2a685f46e61c3fc8937f19e Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 22 Oct 2015 16:12:53 -0700 Subject: Revert "Revert "Track ashmem memory usage in Parcel"" This reverts commit 6880307e8e35a6c484942443fb4ddd6173126152. Bug: 25004154 Change-Id: I9b432d1ebc39f3bbcd7afdefc403f0fb6ced8158 --- include/binder/Parcel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index 3ada1e9..220a935 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -342,9 +342,11 @@ public: private: size_t mBlobAshmemSize; + size_t mOpenAshmemSize; public: size_t getBlobAshmemSize() const; + size_t getOpenAshmemSize() const; }; // --------------------------------------------------------------------------- @@ -412,9 +414,9 @@ inline TextOutput& operator<<(TextOutput& to, const Parcel& parcel) // Generic acquire and release of objects. void acquire_object(const sp& proc, - const flat_binder_object& obj, const void* who); + const flat_binder_object& obj, const void* who, size_t* outAshmemSize); void release_object(const sp& proc, - const flat_binder_object& obj, const void* who); + const flat_binder_object& obj, const void* who, size_t* outAshmemSize); void flatten_binder(const sp& proc, const sp& binder, flat_binder_object* out); -- cgit v1.1 From 6bb3114246f6f6aa406e65452dbaa12b135029ea Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 22 Oct 2015 16:46:12 -0700 Subject: Maintain Parcel ABI Makes sure we don't change the memory layout of the Parcel class to maintain binary compatibility with prebuilts linking against libbinder. Bug: 25004154 Change-Id: I656687497f08bb85cefda796aafa2341e601e30a --- include/binder/Parcel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index 220a935..16cd6cf 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -341,10 +341,10 @@ public: }; private: - size_t mBlobAshmemSize; size_t mOpenAshmemSize; public: + // TODO: Remove once ABI can be changed. size_t getBlobAshmemSize() const; size_t getOpenAshmemSize() const; }; @@ -414,9 +414,9 @@ inline TextOutput& operator<<(TextOutput& to, const Parcel& parcel) // Generic acquire and release of objects. void acquire_object(const sp& proc, - const flat_binder_object& obj, const void* who, size_t* outAshmemSize); + const flat_binder_object& obj, const void* who); void release_object(const sp& proc, - const flat_binder_object& obj, const void* who, size_t* outAshmemSize); + const flat_binder_object& obj, const void* who); void flatten_binder(const sp& proc, const sp& binder, flat_binder_object* out); -- cgit v1.1