19
19
#include " EMACMemoryManager.h"
20
20
21
21
22
- class LWIPMemoryManager : public EMACMemoryManager {
22
+ class LWIPMemoryManager final : public EMACMemoryManager {
23
23
public:
24
24
25
25
/* *
@@ -31,7 +31,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
31
31
* @param align Memory alignment requirement in bytes
32
32
* @return Allocated memory buffer, or NULL in case of error
33
33
*/
34
- virtual net_stack_mem_buf_t *alloc_heap (uint32_t size, uint32_t align);
34
+ net_stack_mem_buf_t *alloc_heap (uint32_t size, uint32_t align) override ;
35
35
36
36
/* *
37
37
* Allocates memory buffer chain from a pool
@@ -44,7 +44,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
44
44
* @param align Memory alignment requirement for each buffer in bytes
45
45
* @return Allocated memory buffer chain, or NULL in case of error
46
46
*/
47
- virtual net_stack_mem_buf_t *alloc_pool (uint32_t size, uint32_t align);
47
+ net_stack_mem_buf_t *alloc_pool (uint32_t size, uint32_t align) override ;
48
48
49
49
/* *
50
50
* Get memory buffer pool allocation unit
@@ -54,7 +54,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
54
54
* @param align Memory alignment requirement in bytes
55
55
* @return Contiguous memory size
56
56
*/
57
- virtual uint32_t get_pool_alloc_unit (uint32_t align) const ;
57
+ uint32_t get_pool_alloc_unit (uint32_t align) const override ;
58
58
59
59
/* *
60
60
* Free memory buffer chain
@@ -64,7 +64,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
64
64
*
65
65
* @param buf Memory buffer chain to be freed.
66
66
*/
67
- virtual void free (net_stack_mem_buf_t *buf);
67
+ void free (net_stack_mem_buf_t *buf) override ;
68
68
69
69
/* *
70
70
* Return total length of a memory buffer chain
@@ -74,7 +74,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
74
74
* @param buf Memory buffer chain
75
75
* @return Total length in bytes
76
76
*/
77
- virtual uint32_t get_total_len (const net_stack_mem_buf_t *buf) const ;
77
+ uint32_t get_total_len (const net_stack_mem_buf_t *buf) const override ;
78
78
79
79
/* *
80
80
* Copy a memory buffer chain
@@ -85,7 +85,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
85
85
* @param to_buf Memory buffer chain to copy to
86
86
* @param from_buf Memory buffer chain to copy from
87
87
*/
88
- virtual void copy (net_stack_mem_buf_t *to_buf, const net_stack_mem_buf_t *from_buf);
88
+ void copy (net_stack_mem_buf_t *to_buf, const net_stack_mem_buf_t *from_buf) override ;
89
89
90
90
/* *
91
91
* Copy to a memory buffer chain
@@ -98,7 +98,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
98
98
* @param ptr Pointer to data
99
99
* @param len Data length
100
100
*/
101
- virtual void copy_to_buf (net_stack_mem_buf_t *to_buf, const void *ptr, uint32_t len);
101
+ void copy_to_buf (net_stack_mem_buf_t *to_buf, const void *ptr, uint32_t len) override ;
102
102
103
103
/* *
104
104
* Copy from a memory buffer chain
@@ -110,7 +110,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
110
110
* @param from_buf Memory buffer chain to copy from
111
111
* @return Length of the data that was copied
112
112
*/
113
- virtual uint32_t copy_from_buf (void *ptr, uint32_t len, const net_stack_mem_buf_t *from_buf) const ;
113
+ uint32_t copy_from_buf (void *ptr, uint32_t len, const net_stack_mem_buf_t *from_buf) const override ;
114
114
115
115
/* *
116
116
* Concatenate two memory buffer chains
@@ -122,7 +122,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
122
122
* @param to_buf Memory buffer chain to concatenate to
123
123
* @param cat_buf Memory buffer chain to concatenate
124
124
*/
125
- virtual void cat (net_stack_mem_buf_t *to_buf, net_stack_mem_buf_t *cat_buf);
125
+ void cat (net_stack_mem_buf_t *to_buf, net_stack_mem_buf_t *cat_buf) override ;
126
126
127
127
/* *
128
128
* Returns the next buffer
@@ -132,23 +132,23 @@ class LWIPMemoryManager : public EMACMemoryManager {
132
132
* @param buf Memory buffer
133
133
* @return The next memory buffer, or NULL if last
134
134
*/
135
- virtual net_stack_mem_buf_t *get_next (const net_stack_mem_buf_t *buf) const ;
135
+ net_stack_mem_buf_t *get_next (const net_stack_mem_buf_t *buf) const override ;
136
136
137
137
/* *
138
138
* Return pointer to the payload of the buffer
139
139
*
140
140
* @param buf Memory buffer
141
141
* @return Pointer to the payload
142
142
*/
143
- virtual void *get_ptr (const net_stack_mem_buf_t *buf) const ;
143
+ void *get_ptr (const net_stack_mem_buf_t *buf) const override ;
144
144
145
145
/* *
146
146
* Return payload size of the buffer
147
147
*
148
148
* @param buf Memory buffer
149
149
* @return Size in bytes
150
150
*/
151
- virtual uint32_t get_len (const net_stack_mem_buf_t *buf) const ;
151
+ uint32_t get_len (const net_stack_mem_buf_t *buf) const override ;
152
152
153
153
/* *
154
154
* Sets the payload size of the buffer
@@ -159,7 +159,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
159
159
* @param buf Memory buffer
160
160
* @param len Payload size, must be less or equal allocated size
161
161
*/
162
- virtual void set_len (net_stack_mem_buf_t *buf, uint32_t len);
162
+ void set_len (net_stack_mem_buf_t *buf, uint32_t len) override ;
163
163
164
164
private:
165
165
0 commit comments