Mercurial > hg > graal-compiler
comparison src/share/vm/memory/padded.hpp @ 17760:5479cb006184
8036860: Pad and cache-align the BiasedMappedArray
Summary: Pad and cache-align BiasedMappedArray instances by default to avoid performance variability problems due to false sharing, as instances of this data structures are typically used for performance sensitive code.
Reviewed-by: brutisso, stefank
author | tschatzl |
---|---|
date | Mon, 24 Mar 2014 15:31:00 +0100 |
parents | d7070f371770 |
children |
comparison
equal
deleted
inserted
replaced
17759:bc22cbb8b45a | 17760:5479cb006184 |
---|---|
99 // Creates an aligned padded 2D array. | 99 // Creates an aligned padded 2D array. |
100 // The memory cannot be deleted since the raw memory chunk is not returned. | 100 // The memory cannot be deleted since the raw memory chunk is not returned. |
101 static T** create_unfreeable(uint rows, uint columns, size_t* allocation_size = NULL); | 101 static T** create_unfreeable(uint rows, uint columns, size_t* allocation_size = NULL); |
102 }; | 102 }; |
103 | 103 |
104 // Helper class to create an array of T objects. The array as a whole will | |
105 // start at a multiple of alignment and its size will be aligned to alignment. | |
106 template <class T, MEMFLAGS flags, size_t alignment = DEFAULT_CACHE_LINE_SIZE> | |
107 class PaddedPrimitiveArray { | |
108 public: | |
109 static T* create_unfreeable(size_t length); | |
110 }; | |
111 | |
104 #endif // SHARE_VM_MEMORY_PADDED_HPP | 112 #endif // SHARE_VM_MEMORY_PADDED_HPP |