< prev index next >
src/hotspot/share/memory/padded.inline.hpp
Print this page
rev 50098 : [mq]: 8202842-g1-footprint-regressions
*** 1,7 ****
/*
! * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 60,72 ****
size_t row_size = align_up(columns * sizeof(T), alignment);
// Total size consists of the indirection table plus the rows.
size_t total_size = table_size + rows * row_size + alignment;
// Allocate a chunk of memory large enough to allow alignment of the chunk.
! void* chunk = AllocateHeap(total_size, flags);
// Clear the allocated memory.
- memset(chunk, 0, total_size);
// Align the chunk of memory.
T** result = (T**)align_up(chunk, alignment);
void* data_start = (void*)((uintptr_t)result + table_size);
// Fill in the row table.
--- 60,71 ----
size_t row_size = align_up(columns * sizeof(T), alignment);
// Total size consists of the indirection table plus the rows.
size_t total_size = table_size + rows * row_size + alignment;
// Allocate a chunk of memory large enough to allow alignment of the chunk.
! void* chunk = MmapArrayAllocator<uint8_t>::allocate(total_size, flags);
// Clear the allocated memory.
// Align the chunk of memory.
T** result = (T**)align_up(chunk, alignment);
void* data_start = (void*)((uintptr_t)result + table_size);
// Fill in the row table.
< prev index next >