equal
deleted
inserted
replaced
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 } |