43 virtual void *heap_alloc_single(
size_t size);
44 virtual void heap_free_single(
void *ptr);
46 virtual void *heap_alloc_array(
size_t size);
47 virtual void *heap_realloc_array(
void *ptr,
size_t size);
48 virtual void heap_free_array(
void *ptr);
50 INLINE
void inc_heap(
size_t size);
51 INLINE
void dec_heap(
size_t size);
53 bool heap_trim(
size_t pad);
55 constexpr
static size_t get_memory_alignment() {
56 return MEMORY_HOOK_ALIGNMENT;
59 virtual void *mmap_alloc(
size_t size,
bool allow_exec);
60 virtual void mmap_free(
void *ptr,
size_t size);
61 INLINE
size_t get_page_size()
const;
62 INLINE
size_t round_up_to_page_size(
size_t size)
const;
64 virtual void mark_pointer(
void *ptr,
size_t orig_size,
ReferenceCount *ref_ptr);
68 virtual void alloc_fail(
size_t attempted_size);
70 INLINE
static size_t get_ptr_size(
void *ptr);
73 TVOLATILE AtomicAdjust::Integer _total_heap_single_size;
74 TVOLATILE AtomicAdjust::Integer _total_heap_array_size;
75 TVOLATILE AtomicAdjust::Integer _requested_heap_size;
76 TVOLATILE AtomicAdjust::Integer _total_mmap_size;
80 size_t _max_heap_size;
82 virtual void overflow_heap_size();
87 typedef std::map<size_t, DeletedBufferChain *> DeletedChains;
88 DeletedChains _deleted_chains;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for all things that want to be reference-counted.
This class provides a wrapper around the various possible malloc schemes Panda might employ.
A fake mutex implementation for single-threaded applications that don't need any synchronization cont...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class can be used to provide faster allocation/deallocation for many Panda objects.