acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_heap_allocator.h
1//Created by camilo on 2023-11-23 15:56 BRT <3ThomasBorregaardSorensen!!
2#pragma once
3
4
5#include "acme/memory/allocator.h"
6#include "acme/memory/heap.h"
7#include "acme/_operating_system.h"
8
9
10namespace windows
11{
12
13
14 class CLASS_DECL_ACME heap_allocator :
15 virtual public ::heap::allocator
16 {
17 protected:
18 friend class ::c::malloc;
19 heap_allocator();
20 ~heap_allocator();
21 public:
22
23
24 HANDLE m_handle;
25 ::critical_section m_criticalsection;
26
27
28 void initialize_allocator(::acme::acme * pacme) override;
29
30
31 void * allocate(memsize s, const_char_pointer pszAnnotation = nullptr) override;
32 void * reallocate(void * p, memsize s, const_char_pointer pszAnnotation = nullptr) override;
33 void free(void * p) override;
34 memsize size(void * p) override;
35 bool has_size() const override;
36
37 };
38
39
40} // namespace windows
41
42
Definition acme.h:22
Definition critical_section.h:9
Definition allocator.h:37