acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
memory.h
1//
2// _heap.h
3// acme
4//
5// Created by Camilo Sasuke Thomas Borregaard Soerensen on 28/02/20.
6//
7#pragma once
8
9
10#include "acme/memory/allocator_base.h"
11#include "acme/memory/management.h"
12
13
15
16
17namespace heap
18{
19
20
21 class CLASS_DECL_ACME memory :
22 virtual public ::heap::allocator_base
23 {
24 protected:
25
26
27 friend class ::c::malloc;
28
29
30 memory();
31 virtual ~memory();
32
33
34 public:
35
36
37 heap * m_pheap;
38
39
40
41
42
43 virtual void initialize_memory(::heap::heap * pheap);
44
45
46 virtual void start_memory();
47
48
49 //Created by camilo on 2021-07-24 01:06 BRT <3ThomasBorregaardSorensen!!
50//#include "__aligned_memory_allocate.h"
51 virtual void * aligned_allocate(memsize size, memsize * psizeAllocated, memsize align = 0, const_char_pointer pszAnnotation = nullptr);
52 virtual void * aligned_allocate_debug(memsize nSize, memsize * psizeAllocated, ::i32 nBlockUse, const_char_pointer szFileName, ::i32 nLine, memsize align = 0, const_char_pointer pszAnnotation = nullptr);
53
54
55 //Created by camilo on 2021-07-24 01:05 BRT <3ThomasBorregaardSorensen!!
56//#include "__unaligned_memory_allocate.h"
57 virtual void * unaligned_allocate(memsize size, memsize * psizeAllocated, const_char_pointer pszAnnotation = nullptr);
58 virtual void * unaligned_allocate_debug(memsize nSize, memsize * psizeAllocated, ::i32 nBlockUse, const_char_pointer szFileName, ::i32 nLine, const_char_pointer pszAnnotation = nullptr);
59
60 virtual void * count_allocate(::collection::count count, memsize size, const_char_pointer pszAnnotation = nullptr);
61 //Created by camilo on 2021-07-24 01:05 BRT <3ThomasBorregaardSorensen!!
62 //#include "__memory_allocate.h"
63
64
65#if !defined(MCHECK) && !defined(__VLD) && !defined(__MCRTDBG)
66
67
68 void * allocate(memsize size, memsize * psizeActuallyAllocated, const_char_pointer pszAnnotation = nullptr) override;
69 void * reallocate(void * p, memsize nSize, const_char_pointer pszAnnotation = nullptr) override;
70 void free(void * p) override;
71 bool has_size() const override;
72 memsize size(void * p) override;
73
74
75#endif
76
77
78 virtual void * allocate_debug(memsize nSize, ::i32 nBlockUse, const_char_pointer szFileName, ::i32 nLine, const_char_pointer pszAnnotation = nullptr);
79 virtual void * reallocate_debug(void * p, memsize nSize, ::i32 nBlockUse, const_char_pointer szFileName, ::i32 nLine, const_char_pointer pszAnnotation = nullptr);
80 virtual void free_debug(void * p, ::i32 iBlockType);
81 virtual memsize size_debug(void * p, ::i32 iBlockType);
82
83 };
84
85
86
87} // namespace heap
88
89//
90//namespace secondary_memory_allocate_heap
91//{
92//
93//
94//#include "__aligned_memory_allocate.h"
95//#include "__unaligned_memory_allocate.h"
96//#include "__memory_allocate.h"
97//
98//
99//}
100//
101//
102//namespace array_memory_allocate_heap
103//{
104//
105//
106//#include "__aligned_memory_allocate.h"
107//#include "__unaligned_memory_allocate.h"
108//#include "__memory_allocate.h"
109//
110//
111//}
112//
113//
114//
115//namespace property_memory_allocate_heap
116//{
117//
118//
119//#include "__aligned_memory_allocate.h"
120//#include "__unaligned_memory_allocate.h"
121//#include "__memory_allocate.h"
122//
123//
124//}
125//
126//
127//namespace string_memory_allocate_heap
128//{
129//
130//
131//#include "__aligned_memory_allocate.h"
132//#include "__unaligned_memory_allocate.h"
133//#include "__memory_allocate.h"
134//
135//
136//}
137//
138//
139//
Definition allocator_base.h:16
Definition heap.h:10
Definition plex_heap_alloc_array.h:9