we make a project with lua(huge small objets in maps), and repalce the malloc system with gperftools 2.8.1
when the lua process running, i found the process will turn out OOM. Here's my stats
[2022-08-15 17:32:05.118] [info] [PHONESTCORE]Call ReleaseFreeMemory() to release freelist memory to the OS (via madvise()).
Bytes released to the OS take up virtual address space but no physical memory.
]
as above, i think maybe the heap cache got some leaks !
why the new span can not use the heap cache??
i read the source coke in page_heap.cc SearchFreeAndLargeLists
is there some bugs in it leading the result that we can not find the proper span in the free list?
i think we should iterate the free list two times, one only for the normal_free_list , if we don't have any, we then use the return_free_list, so we don't need to get more memory from os.( i am not sure, maybe the return_free_list cause the memory growing?)
thanks for reply!