Opened 16 years ago

Last modified 16 years ago

#560 closed enhancement

Optimize the memory usage of DNS resolver — at Initial Version

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.0-rc1
Component: pjlib-util Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

Previously, the DNS resolver (resolver.c) allocates memory for caching DNS answers from the resolver pool, and stores the unused entries in free list. This would cause memory to grow as much as the total number of unique names resolved, and this memory will not be released until the resolver is destroyed.

With the new approach, each DNS answer cache entry will have it's own pool, and when the answer/entry expires, the pool will be destroyed, thus releasing the memory back to the OS.

Change History (0)

Note: See TracTickets for help on using tickets.