< prev index next >
src/hotspot/share/memory/memRegion.cpp
Print this page
rev 58060 : [mq]: 8238999-iklam-review
*** 1,7 ****
/*
! * Copyright (c) 2000, 2014, 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) 2000, 2020, 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.
*** 100,120 ****
}
ShouldNotReachHere();
return MemRegion();
}
! void* MemRegion::operator new(size_t size) throw() {
! return (address)AllocateHeap(size, mtGC, CURRENT_PC,
! AllocFailStrategy::RETURN_NULL);
! }
!
! void* MemRegion::operator new [](size_t size) throw() {
! return (address)AllocateHeap(size, mtGC, CURRENT_PC,
! AllocFailStrategy::RETURN_NULL);
! }
! void MemRegion::operator delete(void* p) {
! FreeHeap(p);
! }
!
! void MemRegion::operator delete [](void* p) {
! FreeHeap(p);
}
--- 100,111 ----
}
ShouldNotReachHere();
return MemRegion();
}
! MemRegion* MemRegion::create(uint length, MEMFLAGS flags) {
! MemRegion* result = NEW_C_HEAP_ARRAY(MemRegion, length, flags);
! for (uint i = 0; i < length; i++) {
! ::new (&result[i]) MemRegion();
! }
! return result;
}
< prev index next >