equal
deleted
inserted
replaced
29 #include "gc/z/zValue.hpp" |
29 #include "gc/z/zValue.hpp" |
30 #include "memory/allocation.hpp" |
30 #include "memory/allocation.hpp" |
31 |
31 |
32 class ZObjectAllocator { |
32 class ZObjectAllocator { |
33 private: |
33 private: |
|
34 const bool _use_per_cpu_shared_small_pages; |
34 ZPerCPU<size_t> _used; |
35 ZPerCPU<size_t> _used; |
35 ZPerCPU<size_t> _undone; |
36 ZPerCPU<size_t> _undone; |
36 ZContended<ZPage*> _shared_medium_page; |
37 ZContended<ZPage*> _shared_medium_page; |
37 ZPerCPU<ZPage*> _shared_small_page; |
38 ZPerCPU<ZPage*> _shared_small_page; |
38 ZPerWorker<ZPage*> _worker_small_page; |
39 ZPerWorker<ZPage*> _worker_small_page; |
|
40 |
|
41 ZPage** shared_small_page_addr(); |
|
42 ZPage* const* shared_small_page_addr() const; |
39 |
43 |
40 ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags); |
44 ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags); |
41 void undo_alloc_page(ZPage* page); |
45 void undo_alloc_page(ZPage* page); |
42 |
46 |
43 // Allocate an object in a shared page. Allocate and |
47 // Allocate an object in a shared page. Allocate and |