Skip to content

Commit f7da09c

Browse files
committed
8301164: Remove unused ResourceStack class
Reviewed-by: coleenp
1 parent 6e4710b commit f7da09c

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

src/hotspot/share/utilities/stack.hpp

-21
Original file line numberDiff line numberDiff line change
@@ -160,27 +160,6 @@ class Stack: public StackBase<F>
160160
E* _cache; // Segment cache to avoid ping-ponging.
161161
};
162162

163-
template <class E, MEMFLAGS F> class ResourceStack: public Stack<E, F>, public ResourceObj
164-
{
165-
public:
166-
// If this class becomes widely used, it may make sense to save the Thread
167-
// and use it when allocating segments.
168-
// ResourceStack(size_t segment_size = Stack<E, F>::default_segment_size()):
169-
ResourceStack(size_t segment_size): Stack<E, F>(segment_size, max_uintx)
170-
{ }
171-
172-
// Set the segment pointers to nullptr so the parent dtor does not free them;
173-
// that must be done by the ResourceMark code.
174-
~ResourceStack() { Stack<E, F>::reset(true); }
175-
176-
protected:
177-
virtual E* alloc(size_t bytes);
178-
virtual void free(E* addr, size_t bytes);
179-
180-
private:
181-
void clear(bool clear_cache = false);
182-
};
183-
184163
template <class E, MEMFLAGS F>
185164
class StackIterator: public StackObj
186165
{

src/hotspot/share/utilities/stack.inline.hpp

-12
Original file line numberDiff line numberDiff line change
@@ -243,18 +243,6 @@ void Stack<E, F>::zap_segment(E* seg, bool zap_link_field) const
243243
}
244244
#endif
245245

246-
template <class E, MEMFLAGS F>
247-
E* ResourceStack<E, F>::alloc(size_t bytes)
248-
{
249-
return (E*) resource_allocate_bytes(bytes);
250-
}
251-
252-
template <class E, MEMFLAGS F>
253-
void ResourceStack<E, F>::free(E* addr, size_t bytes)
254-
{
255-
resource_free_bytes(Thread::current(), (char*) addr, bytes);
256-
}
257-
258246
template <class E, MEMFLAGS F>
259247
void StackIterator<E, F>::sync()
260248
{

0 commit comments

Comments
 (0)