summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dmitrii Ishcheikin <ishcheikin@google.com> 2024-01-09 15:30:50 +0000
committer Dmitrii Ishcheikin <ishcheikin@google.com> 2024-01-15 19:14:04 +0000
commitace60f2847b3511c466125d53dc54f27d44456ec (patch)
treef72bc834e463d960f553ee959ef6a989a7ca6fbc
parent5a5331561bf36dceec0b10a2079318a21e4e5d06 (diff)
Add visibility attributes in runtime/gc/space
Bug: 260881207 Test: presubmit Test: abtd app_compat_drm Test: abtd app_compat_top_100 Test: abtd app_compat_banking Change-Id: I30e2cc4d0da339711dbbba26f5d140be84b4121a
-rw-r--r--runtime/gc/space/bump_pointer_space-inl.h2
-rw-r--r--runtime/gc/space/bump_pointer_space-walk-inl.h2
-rw-r--r--runtime/gc/space/bump_pointer_space.cc2
-rw-r--r--runtime/gc/space/bump_pointer_space.h4
-rw-r--r--runtime/gc/space/dlmalloc_space-inl.h2
-rw-r--r--runtime/gc/space/dlmalloc_space.cc2
-rw-r--r--runtime/gc/space/dlmalloc_space.h2
-rw-r--r--runtime/gc/space/dlmalloc_space_random_test.cc2
-rw-r--r--runtime/gc/space/dlmalloc_space_static_test.cc2
-rw-r--r--runtime/gc/space/image_space.cc2
-rw-r--r--runtime/gc/space/image_space.h16
-rw-r--r--runtime/gc/space/image_space_test.cc2
-rw-r--r--runtime/gc/space/large_object_space.cc2
-rw-r--r--runtime/gc/space/large_object_space.h2
-rw-r--r--runtime/gc/space/large_object_space_test.cc2
-rw-r--r--runtime/gc/space/malloc_space.cc2
-rw-r--r--runtime/gc/space/malloc_space.h2
-rw-r--r--runtime/gc/space/memory_tool_malloc_space-inl.h2
-rw-r--r--runtime/gc/space/memory_tool_malloc_space.h2
-rw-r--r--runtime/gc/space/memory_tool_settings.h2
-rw-r--r--runtime/gc/space/region_space-inl.h2
-rw-r--r--runtime/gc/space/region_space.cc2
-rw-r--r--runtime/gc/space/region_space.h24
-rw-r--r--runtime/gc/space/rosalloc_space-inl.h2
-rw-r--r--runtime/gc/space/rosalloc_space.cc2
-rw-r--r--runtime/gc/space/rosalloc_space.h2
-rw-r--r--runtime/gc/space/rosalloc_space_random_test.cc2
-rw-r--r--runtime/gc/space/rosalloc_space_static_test.cc2
-rw-r--r--runtime/gc/space/space-inl.h2
-rw-r--r--runtime/gc/space/space.cc2
-rw-r--r--runtime/gc/space/space.h4
-rw-r--r--runtime/gc/space/space_create_test.cc2
-rw-r--r--runtime/gc/space/space_test.h2
-rw-r--r--runtime/gc/space/zygote_space.cc2
-rw-r--r--runtime/gc/space/zygote_space.h2
35 files changed, 55 insertions, 55 deletions
diff --git a/runtime/gc/space/bump_pointer_space-inl.h b/runtime/gc/space/bump_pointer_space-inl.h
index 2774b9e71c..6751344bc4 100644
--- a/runtime/gc/space/bump_pointer_space-inl.h
+++ b/runtime/gc/space/bump_pointer_space-inl.h
@@ -22,7 +22,7 @@
#include "base/bit_utils.h"
#include "mirror/object-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/bump_pointer_space-walk-inl.h b/runtime/gc/space/bump_pointer_space-walk-inl.h
index 89e42bcf27..86af0451de 100644
--- a/runtime/gc/space/bump_pointer_space-walk-inl.h
+++ b/runtime/gc/space/bump_pointer_space-walk-inl.h
@@ -25,7 +25,7 @@
#include <memory>
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/bump_pointer_space.cc b/runtime/gc/space/bump_pointer_space.cc
index aa85ba1247..17e08357e8 100644
--- a/runtime/gc/space/bump_pointer_space.cc
+++ b/runtime/gc/space/bump_pointer_space.cc
@@ -20,7 +20,7 @@
#include "mirror/object-inl.h"
#include "thread_list.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/bump_pointer_space.h b/runtime/gc/space/bump_pointer_space.h
index d5ab5069ec..77beb476e6 100644
--- a/runtime/gc/space/bump_pointer_space.h
+++ b/runtime/gc/space/bump_pointer_space.h
@@ -22,7 +22,7 @@
#include <deque>
-namespace art {
+namespace art HIDDEN {
namespace mirror {
class Object;
@@ -39,7 +39,7 @@ namespace space {
// A bump pointer space allocates by incrementing a pointer, it doesn't provide a free
// implementation as its intended to be evacuated.
-class BumpPointerSpace final : public ContinuousMemMapAllocSpace {
+class EXPORT BumpPointerSpace final : public ContinuousMemMapAllocSpace {
public:
using WalkCallback = void (*)(void *, void *, int, void *);
diff --git a/runtime/gc/space/dlmalloc_space-inl.h b/runtime/gc/space/dlmalloc_space-inl.h
index 6041fd02af..0d9467314b 100644
--- a/runtime/gc/space/dlmalloc_space-inl.h
+++ b/runtime/gc/space/dlmalloc_space-inl.h
@@ -21,7 +21,7 @@
#include "gc/allocator/art-dlmalloc.h"
#include "thread.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/dlmalloc_space.cc b/runtime/gc/space/dlmalloc_space.cc
index dda390faca..b45e4824ed 100644
--- a/runtime/gc/space/dlmalloc_space.cc
+++ b/runtime/gc/space/dlmalloc_space.cc
@@ -34,7 +34,7 @@
#include "thread.h"
#include "thread_list.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/dlmalloc_space.h b/runtime/gc/space/dlmalloc_space.h
index 82b3cc0b32..774d2e3c80 100644
--- a/runtime/gc/space/dlmalloc_space.h
+++ b/runtime/gc/space/dlmalloc_space.h
@@ -20,7 +20,7 @@
#include "malloc_space.h"
#include "space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace collector {
diff --git a/runtime/gc/space/dlmalloc_space_random_test.cc b/runtime/gc/space/dlmalloc_space_random_test.cc
index b653bcf03a..bcca442fb8 100644
--- a/runtime/gc/space/dlmalloc_space_random_test.cc
+++ b/runtime/gc/space/dlmalloc_space_random_test.cc
@@ -18,7 +18,7 @@
#include "dlmalloc_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
namespace {
diff --git a/runtime/gc/space/dlmalloc_space_static_test.cc b/runtime/gc/space/dlmalloc_space_static_test.cc
index 74dd765dfd..c07a8eaa8b 100644
--- a/runtime/gc/space/dlmalloc_space_static_test.cc
+++ b/runtime/gc/space/dlmalloc_space_static_test.cc
@@ -18,7 +18,7 @@
#include "dlmalloc_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
namespace {
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 7d0bb1b674..3314c14fca 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -69,7 +69,7 @@
#include "runtime.h"
#include "space-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/image_space.h b/runtime/gc/space/image_space.h
index 5271489fc6..63a47c86c1 100644
--- a/runtime/gc/space/image_space.h
+++ b/runtime/gc/space/image_space.h
@@ -24,7 +24,7 @@
#include "runtime.h"
#include "space.h"
-namespace art {
+namespace art HIDDEN {
class DexFile;
enum class InstructionSet;
@@ -152,9 +152,9 @@ class ImageSpace : public MemMapSpace {
// Try to open an existing app image space for an oat file,
// using the boot image spaces from the current Runtime.
- static std::unique_ptr<ImageSpace> CreateFromAppImage(const char* image,
- const OatFile* oat_file,
- std::string* error_msg)
+ EXPORT static std::unique_ptr<ImageSpace> CreateFromAppImage(const char* image,
+ const OatFile* oat_file,
+ std::string* error_msg)
REQUIRES_SHARED(Locks::mutator_lock_);
// Try to open an existing app image space for an the oat file and given boot image spaces.
static std::unique_ptr<ImageSpace> CreateFromAppImage(
@@ -167,7 +167,7 @@ class ImageSpace : public MemMapSpace {
static bool IsBootClassPathOnDisk(InstructionSet image_isa);
// Give access to the OatFile.
- const OatFile* GetOatFile() const;
+ EXPORT const OatFile* GetOatFile() const;
// Releases the OatFile from the ImageSpace so it can be transfer to
// the caller, presumably the OatFileManager.
@@ -238,8 +238,8 @@ class ImageSpace : public MemMapSpace {
// Returns the checksums for the boot image, extensions and extra boot class path dex files,
// based on the image spaces and boot class path dex files loaded in memory.
// The `image_spaces` must correspond to the head of the `boot_class_path`.
- static std::string GetBootClassPathChecksums(ArrayRef<ImageSpace* const> image_spaces,
- ArrayRef<const DexFile* const> boot_class_path);
+ EXPORT static std::string GetBootClassPathChecksums(
+ ArrayRef<ImageSpace* const> image_spaces, ArrayRef<const DexFile* const> boot_class_path);
// Returns the total number of components (jar files) associated with the image spaces.
static size_t GetNumberOfComponents(ArrayRef<gc::space::ImageSpace* const> image_spaces);
@@ -255,7 +255,7 @@ class ImageSpace : public MemMapSpace {
/*out*/std::string* error_msg);
// Expand a single image location to multi-image locations based on the dex locations.
- static std::vector<std::string> ExpandMultiImageLocations(
+ EXPORT static std::vector<std::string> ExpandMultiImageLocations(
ArrayRef<const std::string> dex_locations,
const std::string& image_location,
bool boot_image_extension = false);
diff --git a/runtime/gc/space/image_space_test.cc b/runtime/gc/space/image_space_test.cc
index 8fb39e849b..e6b758fe55 100644
--- a/runtime/gc/space/image_space_test.cc
+++ b/runtime/gc/space/image_space_test.cc
@@ -28,7 +28,7 @@
#include "noop_compiler_callbacks.h"
#include "oat_file.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/large_object_space.cc b/runtime/gc/space/large_object_space.cc
index b0db30b176..3d9fd5a620 100644
--- a/runtime/gc/space/large_object_space.cc
+++ b/runtime/gc/space/large_object_space.cc
@@ -36,7 +36,7 @@
#include "space-inl.h"
#include "thread-current-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/large_object_space.h b/runtime/gc/space/large_object_space.h
index 5588f5f7c6..ae1526d818 100644
--- a/runtime/gc/space/large_object_space.h
+++ b/runtime/gc/space/large_object_space.h
@@ -27,7 +27,7 @@
#include <set>
#include <vector>
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/large_object_space_test.cc b/runtime/gc/space/large_object_space_test.cc
index 99a67c5812..1d1bc6e683 100644
--- a/runtime/gc/space/large_object_space_test.cc
+++ b/runtime/gc/space/large_object_space_test.cc
@@ -19,7 +19,7 @@
#include "base/time_utils.h"
#include "space_test.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/malloc_space.cc b/runtime/gc/space/malloc_space.cc
index b25c4fab38..ca2991a8b8 100644
--- a/runtime/gc/space/malloc_space.cc
+++ b/runtime/gc/space/malloc_space.cc
@@ -35,7 +35,7 @@
#include "thread.h"
#include "thread_list.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/malloc_space.h b/runtime/gc/space/malloc_space.h
index 59ab3f3214..73ce4e7436 100644
--- a/runtime/gc/space/malloc_space.h
+++ b/runtime/gc/space/malloc_space.h
@@ -24,7 +24,7 @@
#include "base/memory_tool.h"
#include "base/mutex.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace collector {
diff --git a/runtime/gc/space/memory_tool_malloc_space-inl.h b/runtime/gc/space/memory_tool_malloc_space-inl.h
index ba088893f7..3fc2b7ab40 100644
--- a/runtime/gc/space/memory_tool_malloc_space-inl.h
+++ b/runtime/gc/space/memory_tool_malloc_space-inl.h
@@ -23,7 +23,7 @@
#include "memory_tool_settings.h"
#include "mirror/object-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/memory_tool_malloc_space.h b/runtime/gc/space/memory_tool_malloc_space.h
index ce72b5b435..c76bb9c4ad 100644
--- a/runtime/gc/space/memory_tool_malloc_space.h
+++ b/runtime/gc/space/memory_tool_malloc_space.h
@@ -19,7 +19,7 @@
#include "malloc_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/memory_tool_settings.h b/runtime/gc/space/memory_tool_settings.h
index e9333c8c97..6fe4f59c34 100644
--- a/runtime/gc/space/memory_tool_settings.h
+++ b/runtime/gc/space/memory_tool_settings.h
@@ -17,7 +17,7 @@
#ifndef ART_RUNTIME_GC_SPACE_MEMORY_TOOL_SETTINGS_H_
#define ART_RUNTIME_GC_SPACE_MEMORY_TOOL_SETTINGS_H_
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/region_space-inl.h b/runtime/gc/space/region_space-inl.h
index 4376137cb4..d67fc0ef47 100644
--- a/runtime/gc/space/region_space-inl.h
+++ b/runtime/gc/space/region_space-inl.h
@@ -22,7 +22,7 @@
#include "region_space.h"
#include "thread-current-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/region_space.cc b/runtime/gc/space/region_space.cc
index 49ea2d64e6..e891739ec7 100644
--- a/runtime/gc/space/region_space.cc
+++ b/runtime/gc/space/region_space.cc
@@ -24,7 +24,7 @@
#include "mirror/object-inl.h"
#include "thread_list.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/region_space.h b/runtime/gc/space/region_space.h
index 98f2060df1..c6b68250fc 100644
--- a/runtime/gc/space/region_space.h
+++ b/runtime/gc/space/region_space.h
@@ -25,7 +25,7 @@
#include <functional>
#include <map>
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace accounting {
@@ -99,7 +99,7 @@ class RegionSpace final : public ContinuousMemMapAllocSpace {
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!region_lock_) {
return AllocationSizeNonvirtual(obj, usable_size);
}
- size_t AllocationSizeNonvirtual(mirror::Object* obj, size_t* usable_size)
+ EXPORT size_t AllocationSizeNonvirtual(mirror::Object* obj, size_t* usable_size)
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!region_lock_);
size_t Free(Thread*, mirror::Object*) override {
@@ -117,7 +117,7 @@ class RegionSpace final : public ContinuousMemMapAllocSpace {
return &mark_bitmap_;
}
- void Clear() override REQUIRES(!region_lock_);
+ EXPORT void Clear() override REQUIRES(!region_lock_);
// Remove read and write memory protection from the whole region space,
// i.e. make memory pages backing the region area not readable and not
@@ -128,7 +128,7 @@ class RegionSpace final : public ContinuousMemMapAllocSpace {
// pages backing the region area readable and writable. This method is useful
// to avoid page protection faults when dumping information about an invalid
// reference.
- void Unprotect();
+ EXPORT void Unprotect();
// Change the non growth limit capacity to new capacity by shrinking or expanding the map.
// Currently, only shrinking is supported.
@@ -137,15 +137,15 @@ class RegionSpace final : public ContinuousMemMapAllocSpace {
// growth limit.
void ClampGrowthLimit(size_t new_capacity) REQUIRES(!region_lock_);
- void Dump(std::ostream& os) const override;
+ EXPORT void Dump(std::ostream& os) const override;
void DumpRegions(std::ostream& os) REQUIRES(!region_lock_);
// Dump region containing object `obj`. Precondition: `obj` is in the region space.
void DumpRegionForObject(std::ostream& os, mirror::Object* obj) REQUIRES(!region_lock_);
- void DumpNonFreeRegions(std::ostream& os) REQUIRES(!region_lock_);
+ EXPORT void DumpNonFreeRegions(std::ostream& os) REQUIRES(!region_lock_);
- size_t RevokeThreadLocalBuffers(Thread* thread) override REQUIRES(!region_lock_);
+ EXPORT size_t RevokeThreadLocalBuffers(Thread* thread) override REQUIRES(!region_lock_);
size_t RevokeThreadLocalBuffers(Thread* thread, const bool reuse) REQUIRES(!region_lock_);
- size_t RevokeAllThreadLocalBuffers() override
+ EXPORT size_t RevokeAllThreadLocalBuffers() override
REQUIRES(!Locks::runtime_shutdown_lock_, !Locks::thread_list_lock_, !region_lock_);
void AssertThreadLocalBuffersAreRevoked(Thread* thread) REQUIRES(!region_lock_);
void AssertAllThreadLocalBuffersAreRevoked()
@@ -227,7 +227,7 @@ class RegionSpace final : public ContinuousMemMapAllocSpace {
accounting::ContinuousSpaceBitmap::SweepCallback* GetSweepCallback() override {
return nullptr;
}
- bool LogFragmentationAllocFailure(std::ostream& os, size_t failed_alloc_bytes) override
+ EXPORT bool LogFragmentationAllocFailure(std::ostream& os, size_t failed_alloc_bytes) override
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!region_lock_);
// Object alignment within the space.
@@ -453,11 +453,11 @@ class RegionSpace final : public ContinuousMemMapAllocSpace {
REQUIRES(region_space->region_lock_);
// Given a free region, declare it non-free (allocated) and large.
- void UnfreeLarge(RegionSpace* region_space, uint32_t alloc_time)
+ EXPORT void UnfreeLarge(RegionSpace* region_space, uint32_t alloc_time)
REQUIRES(region_space->region_lock_);
// Given a free region, declare it non-free (allocated) and large tail.
- void UnfreeLargeTail(RegionSpace* region_space, uint32_t alloc_time)
+ EXPORT void UnfreeLargeTail(RegionSpace* region_space, uint32_t alloc_time)
REQUIRES(region_space->region_lock_);
void MarkAsAllocated(RegionSpace* region_space, uint32_t alloc_time)
@@ -715,7 +715,7 @@ class RegionSpace final : public ContinuousMemMapAllocSpace {
}
}
- Region* AllocateRegion(bool for_evac) REQUIRES(region_lock_);
+ EXPORT Region* AllocateRegion(bool for_evac) REQUIRES(region_lock_);
void RevokeThreadLocalBuffersLocked(Thread* thread, bool reuse) REQUIRES(region_lock_);
// Scan region range [`begin`, `end`) in increasing order to try to
diff --git a/runtime/gc/space/rosalloc_space-inl.h b/runtime/gc/space/rosalloc_space-inl.h
index 09aa7cf8a3..f37376377e 100644
--- a/runtime/gc/space/rosalloc_space-inl.h
+++ b/runtime/gc/space/rosalloc_space-inl.h
@@ -24,7 +24,7 @@
#include "gc/space/memory_tool_settings.h"
#include "thread.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/rosalloc_space.cc b/runtime/gc/space/rosalloc_space.cc
index 86a5d3a794..2639755015 100644
--- a/runtime/gc/space/rosalloc_space.cc
+++ b/runtime/gc/space/rosalloc_space.cc
@@ -31,7 +31,7 @@
#include "thread.h"
#include "thread_list.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/rosalloc_space.h b/runtime/gc/space/rosalloc_space.h
index 7becea0828..712b344a4f 100644
--- a/runtime/gc/space/rosalloc_space.h
+++ b/runtime/gc/space/rosalloc_space.h
@@ -21,7 +21,7 @@
#include "malloc_space.h"
#include "space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace collector {
diff --git a/runtime/gc/space/rosalloc_space_random_test.cc b/runtime/gc/space/rosalloc_space_random_test.cc
index 3010b775f3..211c6be515 100644
--- a/runtime/gc/space/rosalloc_space_random_test.cc
+++ b/runtime/gc/space/rosalloc_space_random_test.cc
@@ -18,7 +18,7 @@
#include "rosalloc_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
namespace {
diff --git a/runtime/gc/space/rosalloc_space_static_test.cc b/runtime/gc/space/rosalloc_space_static_test.cc
index 860a4615e4..fcb03cec65 100644
--- a/runtime/gc/space/rosalloc_space_static_test.cc
+++ b/runtime/gc/space/rosalloc_space_static_test.cc
@@ -18,7 +18,7 @@
#include "rosalloc_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
namespace {
diff --git a/runtime/gc/space/space-inl.h b/runtime/gc/space/space-inl.h
index 3ea68cf9ca..d5fb081a78 100644
--- a/runtime/gc/space/space-inl.h
+++ b/runtime/gc/space/space-inl.h
@@ -24,7 +24,7 @@
#include "image_space.h"
#include "large_object_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/space.cc b/runtime/gc/space/space.cc
index cae9ce8f06..5fc09b83df 100644
--- a/runtime/gc/space/space.cc
+++ b/runtime/gc/space/space.cc
@@ -25,7 +25,7 @@
#include "runtime.h"
#include "thread-current-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h
index 160c73097c..abe26b4e26 100644
--- a/runtime/gc/space/space.h
+++ b/runtime/gc/space/space.h
@@ -28,7 +28,7 @@
#include "gc/collector/object_byte_pair.h"
#include "runtime_globals.h"
-namespace art {
+namespace art HIDDEN {
namespace mirror {
class Object;
} // namespace mirror
@@ -77,7 +77,7 @@ enum SpaceType {
std::ostream& operator<<(std::ostream& os, SpaceType space_type);
// A space contains memory allocated for managed objects.
-class Space {
+class EXPORT Space {
public:
// Dump space. Also key method for C++ vtables.
virtual void Dump(std::ostream& os) const;
diff --git a/runtime/gc/space/space_create_test.cc b/runtime/gc/space/space_create_test.cc
index 25bc12e85b..83568351b3 100644
--- a/runtime/gc/space/space_create_test.cc
+++ b/runtime/gc/space/space_create_test.cc
@@ -20,7 +20,7 @@
#include "rosalloc_space.h"
#include "scoped_thread_state_change-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/space_test.h b/runtime/gc/space/space_test.h
index 4b01e83b38..2be1b9445a 100644
--- a/runtime/gc/space/space_test.h
+++ b/runtime/gc/space/space_test.h
@@ -31,7 +31,7 @@
#include "thread_list.h"
#include "zygote_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/zygote_space.cc b/runtime/gc/space/zygote_space.cc
index f40061ff88..cab183ef94 100644
--- a/runtime/gc/space/zygote_space.cc
+++ b/runtime/gc/space/zygote_space.cc
@@ -25,7 +25,7 @@
#include "runtime.h"
#include "thread-current-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {
diff --git a/runtime/gc/space/zygote_space.h b/runtime/gc/space/zygote_space.h
index 3ebc943d96..12cc5c7e8b 100644
--- a/runtime/gc/space/zygote_space.h
+++ b/runtime/gc/space/zygote_space.h
@@ -21,7 +21,7 @@
#include "gc/accounting/space_bitmap.h"
#include "malloc_space.h"
-namespace art {
+namespace art HIDDEN {
namespace gc {
namespace space {