aboutsummaryrefslogtreecommitdiff
path: root/src/processor/map_serializers-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/map_serializers-inl.h')
-rw-r--r--src/processor/map_serializers-inl.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/processor/map_serializers-inl.h b/src/processor/map_serializers-inl.h
index 760c52e3..d68e8b9f 100644
--- a/src/processor/map_serializers-inl.h
+++ b/src/processor/map_serializers-inl.h
@@ -102,8 +102,7 @@ char *StdMapSerializer<Key, Value>::Serialize(
// Compute size of memory to be allocated.
unsigned int size_to_alloc = SizeOf(m);
// Allocate memory.
- char *serialized_data =
- reinterpret_cast<char*>(operator new(size_to_alloc));
+ char *serialized_data = new char[size_to_alloc];
if (!serialized_data) {
BPLOG(INFO) << "StdMapSerializer memory allocation failed.";
if (size) *size = 0;
@@ -172,8 +171,7 @@ char *RangeMapSerializer<Address, Entry>::Serialize(
// Compute size of memory to be allocated.
unsigned int size_to_alloc = SizeOf(m);
// Allocate memory.
- char *serialized_data =
- reinterpret_cast<char*>(operator new(size_to_alloc));
+ char *serialized_data = new char[size_to_alloc];
if (!serialized_data) {
BPLOG(INFO) << "RangeMapSerializer memory allocation failed.";
if (size) *size = 0;
@@ -252,7 +250,7 @@ char *ContainedRangeMapSerializer<AddrType, EntryType>::Serialize(
const ContainedRangeMap<AddrType, EntryType> *m, unsigned int *size) const {
unsigned int size_to_alloc = SizeOf(m);
// Allocating memory.
- char *serialized_data = reinterpret_cast<char*>(operator new(size_to_alloc));
+ char *serialized_data = new char[size_to_alloc];
if (!serialized_data) {
BPLOG(INFO) << "ContainedRangeMapSerializer memory allocation failed.";
if (size) *size = 0;