提交 b21e905a 编写于 作者: F foyzur 提交者: GitHub

Setting CDB_PALLOC_TAGS only when USE_ASSERT_CHECKING is defined and removing unused code. (#2924)

We set CDB_PALLOC_TAGS regardless of USE_ASSERT_CHECKING on 81627e27. This bloated chunk header in release build, resulting in significantly more memory consumption in certain cases.

In this PR we are restoring the original behavior by setting CDB_PALLOC_TAGS only when USE_ASSERT_CHECKING is set. We are also removing unused code.
Signed-off-by: NFoyzur Rahman <foyzur@gmail.com>
上级 2ee726a4
......@@ -54,8 +54,9 @@
#define CDB_PALLOC_CALLER_ID
*/
#ifdef USE_ASSERT_CHECKING
#define CDB_PALLOC_TAGS
#define ALLOC_SITE_KEY_SIZE 255
#endif
/* CDB_PALLOC_TAGS implies CDB_PALLOC_CALLER_ID */
#if defined(CDB_PALLOC_TAGS) && !defined(CDB_PALLOC_CALLER_ID)
......@@ -85,16 +86,6 @@ typedef uint32 OOMTimeType;
*/
typedef struct MemoryContextData *MemoryContext;
typedef struct
{
char hash_key[ALLOC_SITE_KEY_SIZE];
char* file_name;
int line_no;
int64 alloc_count;
int64 alloc_size;
uint64 gen_allocated; // which generations did we allocate from this site
} AllocSiteInfo;
/*
* CurrentMemoryContext is the default allocation context for palloc().
* We declare it here so that palloc() can be a macro. Avoid accessing it
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册