2275cae089
Eliminates assert check that complains about an attempt to allocate a memory pool block larger than the largest possible block size. In such cases the allocation code now just returns a NULL pointer indicating that it was unable to allocate the requested block, just as it does when a block smaller than the maximum size cannot be allocated because none is currently available. Note: One scenario in which it isn't unreasonable for an application writer to request a block that is too big is the case where a receiving task using a mailbox first receives an excessively large message without its data and then tries to retrieve the data into a memory pool block allocated by the mailbox. Rather than forcing the application writer to check to see if the size of the received message is too big for the memory pool, or adding code to the mailbox subsystem to do such a check, it's easier to pass on the request to the memory pool and simply have it return NULL, which causes the mailbox to report that data retrieval failed. The application can then perform a single check that catches both the case where the memory pool simply ran out of blocks and the case where it didn't have any block big enough to handle the message. Change-Id: Ifd2cdd8a5927b93d3e9c5df301544e522131d2c6 Signed-off-by: Allan Stephens <allan.stephens@windriver.com> |
||
---|---|---|
.. | ||
include | ||
Kconfig | ||
Makefile | ||
k_command_packet.c | ||
k_event.c | ||
k_fifo.c | ||
k_idle.c | ||
k_init.c | ||
k_irq.c | ||
k_mailbox.c | ||
k_memory_map.c | ||
k_memory_pool.c | ||
k_move_data.c | ||
k_mutex.c | ||
k_nano.c | ||
k_nop.c | ||
k_offload.c | ||
k_pipe.c | ||
k_pipe_buffer.c | ||
k_pipe_get.c | ||
k_pipe_put.c | ||
k_pipe_util.c | ||
k_pipe_xfer.c | ||
k_semaphore.c | ||
k_server.c | ||
k_task.c | ||
k_task_monitor.c | ||
k_ticker.c | ||
k_timer.c |