Review Board 2.0.15


mem: Assume all dynamic packet data is array allocated

Review Request #2494 - Created Nov. 16, 2014 and submitted

Information
Andreas Hansson
gem5
default
Reviewers
Default
Changeset 10567:4b6d25498f4b
---------------------------
mem: Assume all dynamic packet data is array allocated

This patch simplifies how we deal with dynamically allocated data in
the packet, always assuming that it is array allocated, and hence
should be array deallocated (delete[] as opposed to delete). The only
uses of dataDynamic was in the Ruby testers, and these are now changed
to use Packet::allocate or dataDynamicArray as appropriate.

The ARRAY_DATA flag in the packet is removed accordingly. No
defragmentation of the flags is done at this point, leaving a gap in
the bit masks. Going forward I would suggest a name change to better
reflect the semantics, perhaps:

dataStatic -> dataNoFree

dataDynamic -> dataToFree

   
Review request changed
Updated (Dec. 2, 2014, 3:03 a.m.)

Status: Closed (submitted)