< prev index next >

src/hotspot/share/gc/z/zPageAllocator.hpp

Print this page

        

*** 31,92 **** #include "gc/z/zPhysicalMemory.hpp" #include "gc/z/zSafeDelete.hpp" #include "gc/z/zVirtualMemory.hpp" #include "memory/allocation.hpp" ! class ZPageAllocRequest; class ZWorkers; class ZPageAllocator { friend class VMStructs; private: ZLock _lock; ZVirtualMemoryManager _virtual; ZPhysicalMemoryManager _physical; - ZPageCache _cache; const size_t _min_capacity; const size_t _max_capacity; const size_t _max_reserve; ! size_t _current_max_capacity; ! size_t _capacity; size_t _used_high; size_t _used_low; - size_t _used; size_t _allocated; ssize_t _reclaimed; ! ZList<ZPageAllocRequest> _queue; ! ZList<ZPageAllocRequest> _satisfied; mutable ZSafeDelete<ZPage> _safe_delete; ! bool _uncommit; bool _initialized; ! static ZPage* const gc_marker; ! void prime_cache(ZWorkers* workers, size_t size); ! void increase_used(size_t size, bool relocation); ! void decrease_used(size_t size, bool reclaimed); ! ZPage* create_page(uint8_t type, size_t size); ! void destroy_page(ZPage* page); ! size_t max_available(bool no_reserve) const; ! bool ensure_available(size_t size, bool no_reserve); ! void ensure_uncached_available(size_t size); ! void check_out_of_memory_during_initialization(); ! ZPage* alloc_page_common_inner(uint8_t type, size_t size, bool no_reserve); ! ZPage* alloc_page_common(uint8_t type, size_t size, ZAllocationFlags flags); ! ZPage* alloc_page_blocking(uint8_t type, size_t size, ZAllocationFlags flags); ! ZPage* alloc_page_nonblocking(uint8_t type, size_t size, ZAllocationFlags flags); ! size_t flush_cache(ZPageCacheFlushClosure* cl, bool for_allocation); ! void flush_cache_for_allocation(size_t requested); ! void satisfy_alloc_queue(); public: ZPageAllocator(ZWorkers* workers, size_t min_capacity, size_t initial_capacity, --- 31,97 ---- #include "gc/z/zPhysicalMemory.hpp" #include "gc/z/zSafeDelete.hpp" #include "gc/z/zVirtualMemory.hpp" #include "memory/allocation.hpp" ! class ZPageAllocation; class ZWorkers; class ZPageAllocator { friend class VMStructs; private: ZLock _lock; + ZPageCache _cache; ZVirtualMemoryManager _virtual; ZPhysicalMemoryManager _physical; const size_t _min_capacity; const size_t _max_capacity; const size_t _max_reserve; ! volatile size_t _current_max_capacity; ! volatile size_t _capacity; ! volatile size_t _used; size_t _used_high; size_t _used_low; size_t _allocated; ssize_t _reclaimed; ! ZList<ZPageAllocation> _stalled; ! ZList<ZPageAllocation> _satisfied; mutable ZSafeDelete<ZPage> _safe_delete; ! volatile bool _uncommit; bool _initialized; ! bool prime_cache(ZWorkers* workers, size_t size); ! size_t increase_capacity(size_t size); ! void decrease_capacity(size_t size, bool set_max_capacity); ! void increase_used(size_t size, bool allocation, bool relocation); ! void decrease_used(size_t size, bool free, bool reclaimed); ! bool commit_page(ZPage* page); ! void uncommit_page(ZPage* page); ! bool map_page(const ZPage* page) const; ! void unmap_page(const ZPage* page) const; ! void destroy_page(ZPage* page); ! ! bool is_alloc_allowed(size_t size, bool no_reserve) const; ! bool is_alloc_allowed_from_cache(size_t size, bool no_reserve) const; ! bool alloc_page_common_inner(uint8_t type, size_t size, bool no_reserve, ZList<ZPage>* pages); ! bool alloc_page_common(ZPageAllocation* allocation); ! bool alloc_page_stall(ZPageAllocation* allocation); ! bool alloc_page_prepare(ZPageAllocation* allocation); ! ZPage* alloc_page_create(ZPageAllocation* allocation); ! ZPage* alloc_page_finish(ZPageAllocation* allocation); ! void alloc_page_failed(ZPageAllocation* allocation); ! void satisfy_stalled(); ! size_t uncommit_inner(uint64_t delay, uint64_t* timeout); public: ZPageAllocator(ZWorkers* workers, size_t min_capacity, size_t initial_capacity,
*** 110,126 **** void reset_statistics(); ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags); void free_page(ZPage* page, bool reclaimed); ! uint64_t uncommit(uint64_t delay); void enable_deferred_delete() const; void disable_deferred_delete() const; - void map_page(const ZPage* page) const; - void debug_map_page(const ZPage* page) const; void debug_unmap_page(const ZPage* page) const; bool is_alloc_stalled() const; void check_out_of_memory(); --- 115,130 ---- void reset_statistics(); ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags); void free_page(ZPage* page, bool reclaimed); ! uint64_t uncommit(); ! void uncommit_cancel(); void enable_deferred_delete() const; void disable_deferred_delete() const; void debug_map_page(const ZPage* page) const; void debug_unmap_page(const ZPage* page) const; bool is_alloc_stalled() const; void check_out_of_memory();
< prev index next >