MCPcopy Create free account
hub / github.com/GJDuck/e9patch / pool_destroy

Function pool_destroy

examples/stdlib.c:1783–1791  ·  view source on GitHub ↗

* Destroy a malloc() pool. */

Source from the content-addressed store, hash-verified

1781 * Destroy a malloc() pool.
1782 */
1783static 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.

Callers

nothing calls this directly

Calls 1

munmapFunction · 0.85

Tested by

no test coverage detected