You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Entong Shen (JIRA)" <ji...@apache.org> on 2015/12/11 00:26:11 UTC

[jira] [Created] (HAWQ-246) Refactor and cleanup of memory management of the new optimizer

Entong Shen created HAWQ-246:
--------------------------------

             Summary: Refactor and cleanup of memory management of the new optimizer
                 Key: HAWQ-246
                 URL: https://issues.apache.org/jira/browse/HAWQ-246
             Project: Apache HAWQ
          Issue Type: Task
            Reporter: Entong Shen
            Assignee: Lei Chang


This commit eliminates the global new/delete overrides that were causing
compatibility problems (the Allocators.(h/cpp/inl) files have been
completely removed). The GPOS `New()` macro is retained and works the
same way, but has been renamed `GPOS_NEW()` to avoid confusion and
possible name collisions. `GPOS_NEW()` works only for allocating
singleton objects. For allocating arrays, `GPOS_NEW_ARRAY()` is
provided. Because we no longer override the global delete,
objects/arrays allocated by `GPOS_NEW()` and `GPOS_NEW_ARRAY()` must now
be deleted by the new functions `GPOS_DELETE()` and
`GPOS_DELETE_ARRAY()` respectively. All code in GPOS has been
retrofitted for these changes, but Orca and other code that depends on
GPOS should also be changed.

Note that `GPOS_NEW()` and `GPOS_NEW_ARRAY()` should both be
exception-safe and not leak memory when a constructor throws.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)