src/hotspot/share/gc/z/zObjectAllocator.cpp
changeset 54094 ed3c6f07faab
parent 53072 82d3f0820d37
child 54248 b9cd87da3211
equal deleted inserted replaced
54093:9d02451b536e 54094:ed3c6f07faab
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   111   assert(ZThread::is_java(), "Should be a Java thread");
   111   assert(ZThread::is_java(), "Should be a Java thread");
   112 
   112 
   113   uintptr_t addr = 0;
   113   uintptr_t addr = 0;
   114 
   114 
   115   // Allocate new large page
   115   // Allocate new large page
   116   const size_t page_size = align_up(size, ZPageSizeMin);
   116   const size_t page_size = align_up(size, ZGranuleSize);
   117   ZPage* const page = alloc_page(ZPageTypeLarge, page_size, flags);
   117   ZPage* const page = alloc_page(ZPageTypeLarge, page_size, flags);
   118   if (page != NULL) {
   118   if (page != NULL) {
   119     // Allocate the object
   119     // Allocate the object
   120     addr = page->alloc_object(size);
   120     addr = page->alloc_object(size);
   121   }
   121   }