From d269b83dda4f8707718161353ab92aba330cd324 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Tue, 4 Apr 2017 11:50:10 +1000 Subject: [PATCH] rose_build_long_lit: use bytecode_ptr --- src/rose/rose_build_long_lit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rose/rose_build_long_lit.cpp b/src/rose/rose_build_long_lit.cpp index c32f49d0..7ebf73ec 100644 --- a/src/rose/rose_build_long_lit.cpp +++ b/src/rose/rose_build_long_lit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Intel Corporation + * Copyright (c) 2016-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -31,7 +31,7 @@ #include "rose_build_engine_blob.h" #include "rose_build_impl.h" #include "stream_long_lit_hash.h" -#include "util/alloc.h" +#include "util/bytecode_ptr.h" #include "util/bitutils.h" #include "util/verify_types.h" #include "util/compile_context.h" @@ -401,7 +401,7 @@ u32 buildLongLiteralTable(const RoseBuildImpl &build, RoseEngineBlob &blob, u8 streamBitsNocase = lg2(roundUpToPowerOfTwo(tab_nocase.size() + 2)); u32 tot_state_bytes = ROUNDUP_N(streamBitsCase + streamBitsNocase, 8) / 8; - auto table = aligned_zmalloc_unique(tabSize); + auto table = make_zeroed_bytecode_ptr(tabSize, 16); assert(table); // otherwise would have thrown std::bad_alloc // Fill in the RoseLongLitTable header structure. @@ -435,7 +435,7 @@ u32 buildLongLiteralTable(const RoseBuildImpl &build, RoseEngineBlob &blob, *historyRequired = max(*historyRequired, max_len); *longLitStreamStateRequired = tot_state_bytes; - return blob.add(table.get(), tabSize, 16); + return blob.add(table); } } // namespace ue2