@@ -77,7 +77,7 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
77
77
}
78
78
79
79
/* * Allocate a memory block from a memory pool, without blocking.
80
- @return address of the allocated memory block or NULL in case of no memory available.
80
+ @return address of the allocated memory block or nullptr in case of no memory available.
81
81
82
82
@note You may call this function from ISR context.
83
83
*/
@@ -88,7 +88,7 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
88
88
89
89
/* * Allocate a memory block from a memory pool, optionally blocking.
90
90
@param millisec timeout value (osWaitForever to wait forever)
91
- @return address of the allocated memory block or NULL in case of no memory available.
91
+ @return address of the allocated memory block or nullptr in case of no memory available.
92
92
93
93
@note You may call this function from ISR context if the millisec parameter is set to 0.
94
94
*/
@@ -99,7 +99,7 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
99
99
100
100
/* * Allocate a memory block from a memory pool, blocking.
101
101
@param millisec absolute timeout time, referenced to Kernel::get_ms_count().
102
- @return address of the allocated memory block or NULL in case of no memory available.
102
+ @return address of the allocated memory block or nullptr in case of no memory available.
103
103
104
104
@note You cannot call this function from ISR context.
105
105
@note the underlying RTOS may have a limit to the maximum wait time
@@ -122,37 +122,37 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
122
122
}
123
123
124
124
/* * Allocate a memory block from a memory pool, without blocking, and set memory block to zero.
125
- @return address of the allocated memory block or NULL in case of no memory available.
125
+ @return address of the allocated memory block or nullptr in case of no memory available.
126
126
127
127
@note You may call this function from ISR context.
128
128
*/
129
129
T *calloc (void )
130
130
{
131
131
T *item = alloc ();
132
- if (item != NULL ) {
132
+ if (item != nullptr ) {
133
133
memset (item, 0 , sizeof (T));
134
134
}
135
135
return item;
136
136
}
137
137
138
138
/* * Allocate a memory block from a memory pool, optionally blocking, and set memory block to zero.
139
139
@param millisec timeout value (osWaitForever to wait forever)
140
- @return address of the allocated memory block or NULL in case of no memory available.
140
+ @return address of the allocated memory block or nullptr in case of no memory available.
141
141
142
142
@note You may call this function from ISR context if the millisec parameter is set to 0.
143
143
*/
144
144
T *calloc_for (uint32_t millisec)
145
145
{
146
146
T *item = alloc_for (millisec);
147
- if (item != NULL ) {
147
+ if (item != nullptr ) {
148
148
memset (item, 0 , sizeof (T));
149
149
}
150
150
return item;
151
151
}
152
152
153
153
/* * Allocate a memory block from a memory pool, blocking, and set memory block to zero.
154
154
@param millisec absolute timeout time, referenced to Kernel::get_ms_count().
155
- @return address of the allocated memory block or NULL in case of no memory available.
155
+ @return address of the allocated memory block or nullptr in case of no memory available.
156
156
157
157
@note You cannot call this function from ISR context.
158
158
@note the underlying RTOS may have a limit to the maximum wait time
@@ -163,7 +163,7 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
163
163
T *calloc_until (uint64_t millisec)
164
164
{
165
165
T *item = alloc_until (millisec);
166
- if (item != NULL ) {
166
+ if (item != nullptr ) {
167
167
memset (item, 0 , sizeof (T));
168
168
}
169
169
return item;
@@ -172,7 +172,7 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
172
172
/* * Free a memory block.
173
173
@param block address of the allocated memory block to be freed.
174
174
@return osOK on successful deallocation, osErrorParameter if given memory block id
175
- is NULL or invalid, or osErrorResource if given memory block is in an
175
+ is nullptr or invalid, or osErrorResource if given memory block is in an
176
176
invalid memory pool state.
177
177
178
178
@note You may call this function from ISR context.
0 commit comments