[ET Trac] [Einstein Toolkit] #1432: CarpetLib::poison_new_memory when aligning memory
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Wed Sep 4 15:24:13 CDT 2013
#1432: CarpetLib::poison_new_memory when aligning memory
---------------------+------------------------------------------------------
Reporter: rhaas | Owner: eschnett
Type: defect | Status: review
Priority: major | Milestone:
Component: Carpet | Version: development version
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment (by eschnett):
storage_base_ is the pointer returned from operator new. It is only needed
when operator delete is called. There may be additional unused bytes
between storage_base_ and storage_, or after storage_+nbytes. These are
never used, and are thus also not memset.
It would be correct to
{{{
memset(storage_base_, poison_value, nbytes + alignment - 1)
}}}
but as is, the patch leaves some bytes at the end of the used storage
space unset.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1432#comment:2>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list