HomeFreeBSD

Introduce malloc_last_fail() which returns the number of seconds since
rS106305Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Introduce malloc_last_fail() which returns the number of seconds since
malloc(9) failed last time. This is intended to help code adjust
memory usage to the current circumstances.

A typical use could be:
if (malloc_last_fail() < 60)

		reduce_cache_by_one();

Details

Provenance
phkAuthored on
Parents
rS106304: Introduce a "time_uptime" global variable which holds the time since boot
Branches
Unknown
Tags
Unknown

Event Timeline