Joe McDonnell created IMPALA-15713:
--------------------------------------

             Summary: Use sized deletes to optimize malloc interactions
                 Key: IMPALA-15713
                 URL: https://issues.apache.org/jira/browse/IMPALA-15713
             Project: IMPALA
          Issue Type: Improvement
          Components: Backend
    Affects Versions: Impala 5.0.0
            Reporter: Joe McDonnell


On free, a malloc implementation needs to know the size of the pointer being 
freed. This can involve a lookup in a data structure to find the corresponding 
size for the pointer passed in. There are now sized delete APIs where the 
caller can pass in the known size so the malloc implementation can avoid a 
lookup. Google TCMalloc does benefit from sized deletes. (Obviously, the passed 
in size must be correct or it will trip ASAN and other checks.)

We should adapt our code to use sized deletes whenever possible. For example, 
the MemPool uses malloc/free and knows the size. There are several other 
locations where we keep the size information and have it available when freeing 
the pointer.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to