PolarSSL is now part of ARM Official announcement and rebranded as mbed TLS.

Add a callback for realloc

Apr 7, 2015 17:31

bignum and other portions of code are doing an extensive use of realloc via malloc->memcopy->free(old). For memory constrained embedded systems this is a dangerous behavior that can cause fragmentation. Since malloc and free can already be customized via platform_set_malloc_free, my request would be to extend this functionality to also support realloc. By using realloc, users can better use memory pools and only realloc if the request size is bigger than the original allocation anyways.