Merge "Remove unnecessary memsets in linker allocators"

am: 43801a50b0

Change-Id: I9916105c744178672b03803234b3c22e64435f8b
This commit is contained in:
Dimitry Ivanov 2017-02-10 02:38:30 +00:00 committed by android-build-merger
commit 6731a65042
2 changed files with 0 additions and 6 deletions

View file

@ -196,8 +196,6 @@ void LinkerSmallObjectAllocator::alloc_page() {
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map_ptr, PAGE_SIZE, "linker_alloc_small_objects");
memset(map_ptr, 0, PAGE_SIZE);
page_info* info = reinterpret_cast<page_info*>(map_ptr);
memcpy(info->signature, kSignature, sizeof(kSignature));
info->type = type_;
@ -243,8 +241,6 @@ void* LinkerMemoryAllocator::alloc_mmap(size_t size) {
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map_ptr, allocated_size, "linker_alloc_lob");
memset(map_ptr, 0, allocated_size);
page_info* info = reinterpret_cast<page_info*>(map_ptr);
memcpy(info->signature, kSignature, sizeof(kSignature));
info->type = kLargeObject;

View file

@ -113,8 +113,6 @@ void LinkerBlockAllocator::create_new_page() {
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, page, PAGE_SIZE, "linker_alloc");
memset(page, 0, PAGE_SIZE);
FreeBlockInfo* first_block = reinterpret_cast<FreeBlockInfo*>(page->bytes);
first_block->next_block = free_block_list_;
first_block->num_free_blocks = (PAGE_SIZE - sizeof(LinkerBlockAllocatorPage*))/block_size_;