summaryrefslogtreecommitdiffstats
path: root/core/os/pool_allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/pool_allocator.h')
-rw-r--r--core/os/pool_allocator.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/core/os/pool_allocator.h b/core/os/pool_allocator.h
index 11a252bc54..a7a8523aa4 100644
--- a/core/os/pool_allocator.h
+++ b/core/os/pool_allocator.h
@@ -75,22 +75,22 @@ private:
typedef int EntryArrayPos;
typedef int EntryIndicesPos;
- Entry *entry_array;
- int *entry_indices;
- int entry_max;
- int entry_count;
+ Entry *entry_array = nullptr;
+ int *entry_indices = nullptr;
+ int entry_max = 0;
+ int entry_count = 0;
- uint8_t *pool;
- void *mem_ptr;
- int pool_size;
+ uint8_t *pool = nullptr;
+ void *mem_ptr = nullptr;
+ int pool_size = 0;
- int free_mem;
- int free_mem_peak;
+ int free_mem = 0;
+ int free_mem_peak = 0;
- unsigned int check_count;
- int align;
+ unsigned int check_count = 0;
+ int align = 1;
- bool needs_locking;
+ bool needs_locking = false;
inline int entry_end(const Entry &p_entry) const {
return p_entry.pos + aligned(p_entry.len);
@@ -108,7 +108,7 @@ private:
void compact_up(int p_from = 0);
bool get_free_entry(EntryArrayPos *p_pos);
bool find_hole(EntryArrayPos *p_pos, int p_for_size);
- bool find_entry_index(EntryIndicesPos *p_map_pos, Entry *p_entry);
+ bool find_entry_index(EntryIndicesPos *p_map_pos, const Entry *p_entry);
Entry *get_entry(ID p_mem);
const Entry *get_entry(ID p_mem) const;