Opened 8 years ago

Last modified 8 years ago

#1541 closed defect

Memory is sometimes not released by free() in libc — at Initial Version

Reported by: Dimitar Misev Owned by: Dimitar Misev
Priority: critical Milestone: 9.4
Component: rasserver Version: development
Keywords: Cc: Peter Baumann
Complexity: Medium

Description

It appears that in some cases memory is not really released and returned by free(). It's pretty complex and not very clear why.

So far I've come across one solution of replacing the system malloc with tcmalloc or jemalloc; but this still doesn't seem to work in all cases, e.g. it works on Ubuntu 16.04, but not on Ubuntu 14.04.

Another solution I stumbled upon is to use malloc_trim() into trying to force release all free memory from the top of the heap. I've placed this in ObjectBroker::clearBroker() (called on transaction commit/abort), and this appears to work consistently.

Change History (0)

Note: See TracTickets for help on using tickets.