1919#include " EMACMemoryManager.h"
2020
2121
22- class LWIPMemoryManager : public EMACMemoryManager {
22+ class LWIPMemoryManager final : public EMACMemoryManager {
2323public:
2424
2525 /* *
@@ -31,7 +31,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
3131 * @param align Memory alignment requirement in bytes
3232 * @return Allocated memory buffer, or NULL in case of error
3333 */
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 ;
3535
3636 /* *
3737 * Allocates memory buffer chain from a pool
@@ -44,7 +44,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
4444 * @param align Memory alignment requirement for each buffer in bytes
4545 * @return Allocated memory buffer chain, or NULL in case of error
4646 */
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 ;
4848
4949 /* *
5050 * Get memory buffer pool allocation unit
@@ -54,7 +54,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
5454 * @param align Memory alignment requirement in bytes
5555 * @return Contiguous memory size
5656 */
57- virtual uint32_t get_pool_alloc_unit (uint32_t align) const ;
57+ uint32_t get_pool_alloc_unit (uint32_t align) const override ;
5858
5959 /* *
6060 * Free memory buffer chain
@@ -64,7 +64,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
6464 *
6565 * @param buf Memory buffer chain to be freed.
6666 */
67- virtual void free (net_stack_mem_buf_t *buf);
67+ void free (net_stack_mem_buf_t *buf) override ;
6868
6969 /* *
7070 * Return total length of a memory buffer chain
@@ -74,7 +74,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
7474 * @param buf Memory buffer chain
7575 * @return Total length in bytes
7676 */
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 ;
7878
7979 /* *
8080 * Copy a memory buffer chain
@@ -85,7 +85,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
8585 * @param to_buf Memory buffer chain to copy to
8686 * @param from_buf Memory buffer chain to copy from
8787 */
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 ;
8989
9090 /* *
9191 * Copy to a memory buffer chain
@@ -98,7 +98,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
9898 * @param ptr Pointer to data
9999 * @param len Data length
100100 */
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 ;
102102
103103 /* *
104104 * Copy from a memory buffer chain
@@ -110,7 +110,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
110110 * @param from_buf Memory buffer chain to copy from
111111 * @return Length of the data that was copied
112112 */
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 ;
114114
115115 /* *
116116 * Concatenate two memory buffer chains
@@ -122,7 +122,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
122122 * @param to_buf Memory buffer chain to concatenate to
123123 * @param cat_buf Memory buffer chain to concatenate
124124 */
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 ;
126126
127127 /* *
128128 * Returns the next buffer
@@ -132,23 +132,23 @@ class LWIPMemoryManager : public EMACMemoryManager {
132132 * @param buf Memory buffer
133133 * @return The next memory buffer, or NULL if last
134134 */
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 ;
136136
137137 /* *
138138 * Return pointer to the payload of the buffer
139139 *
140140 * @param buf Memory buffer
141141 * @return Pointer to the payload
142142 */
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 ;
144144
145145 /* *
146146 * Return payload size of the buffer
147147 *
148148 * @param buf Memory buffer
149149 * @return Size in bytes
150150 */
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 ;
152152
153153 /* *
154154 * Sets the payload size of the buffer
@@ -159,7 +159,7 @@ class LWIPMemoryManager : public EMACMemoryManager {
159159 * @param buf Memory buffer
160160 * @param len Payload size, must be less or equal allocated size
161161 */
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 ;
163163
164164private:
165165
0 commit comments