You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Lei Chang (JIRA)" <ji...@apache.org> on 2016/01/24 02:24:40 UTC
[jira] [Closed] (HAWQ-246) Refactor and cleanup of memory
management of the new optimizer
[ https://issues.apache.org/jira/browse/HAWQ-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lei Chang closed HAWQ-246.
--------------------------
> 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: Entong Shen
> Fix For: 2.0.0
>
>
> 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)