* Destroy a malloc() pool. */
| 1781 | * Destroy a malloc() pool. |
| 1782 | */ |
| 1783 | static int pool_destroy(struct malloc_pool_s *pool) |
| 1784 | { |
| 1785 | if (pool == &malloc_pool) |
| 1786 | { |
| 1787 | errno = EINVAL; |
| 1788 | return -1; |
| 1789 | } |
| 1790 | return munmap(pool, (size_t)pool->end * MA_UNIT); |
| 1791 | } |
| 1792 | |
| 1793 | /* |
| 1794 | * Pool init. |