From 6fac447555dc94a935b78198479cce645c837b89 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 25 Feb 2014 17:01:10 -0800 Subject: Make allocations report usable size. Work-in-progress to allow arrays to fill usable size. Bug: 13028925. Use C++11's override keyword on GCC >= 2.7 to ensure that we override GC and allocator methods. Move initial mirror::Class set up into a Functor so that all allocated objects have non-zero sizes. Use this property to assert that all objects are never larger than their usable size. Other bits of GC related clean-up, missing initialization, missing use of const, hot methods in .cc files, "unimplemented" functions that fail at runtime in header files, reducing header file includes, move valgrind's space into its own files, reduce number of array allocation routines. Change-Id: Id5760041a2d7f94dcaf17ec760f6095ec75dadaa --- runtime/base/macros.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime/base') diff --git a/runtime/base/macros.h b/runtime/base/macros.h index cf7029a..6cc9396 100644 --- a/runtime/base/macros.h +++ b/runtime/base/macros.h @@ -21,6 +21,15 @@ #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +// C++11 final and override keywords that were introduced in GCC version 4.7. +#if GCC_VERSION >= 40700 +#define OVERRIDE override +#define FINAL final +#else +#define OVERRIDE +#define FINAL +#endif + // The COMPILE_ASSERT macro can be used to verify that a compile time // expression is true. For example, you could use it to verify the // size of a static array: -- cgit v1.1