comparison src/share/vm/adlc/arena.hpp @ 12146:9758d9f36299

8021954: VM SIGSEGV during classloading on MacOS; hs_err_pid file produced Summary: declare all user-defined operator new()s within Hotspot code with the empty throw() exception specification Reviewed-by: coleenp, twisti, dholmes, hseigel, dcubed, kvn, ccheung Contributed-by: lois.foltan@oracle.com
author coleenp
date Thu, 29 Aug 2013 18:56:29 -0400
parents f95d63e2154a
children
comparison
equal deleted inserted replaced
12145:cef1e56a4d88 12146:9758d9f36299
1 /* 1 /*
2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2013, 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.
40 // - AllStatic 40 // - AllStatic
41 // 41 //
42 42
43 class CHeapObj { 43 class CHeapObj {
44 public: 44 public:
45 void* operator new(size_t size); 45 void* operator new(size_t size) throw();
46 void operator delete(void* p); 46 void operator delete(void* p);
47 void* new_array(size_t size); 47 void* new_array(size_t size);
48 }; 48 };
49 49
50 50
51 // Base class for objects used as value objects. 51 // Base class for objects used as value objects.
52 // Calling new or delete will result in fatal error. 52 // Calling new or delete will result in fatal error.
53 53
54 class ValueObj { 54 class ValueObj {
55 public: 55 public:
56 void* operator new(size_t size); 56 void* operator new(size_t size) throw();
57 void operator delete(void* p); 57 void operator delete(void* p);
58 }; 58 };
59 59
60 // Base class for classes that constitute name spaces. 60 // Base class for classes that constitute name spaces.
61 61
62 class AllStatic { 62 class AllStatic {
63 public: 63 public:
64 void* operator new(size_t size); 64 void* operator new(size_t size) throw();
65 void operator delete(void* p); 65 void operator delete(void* p);
66 }; 66 };
67 67
68 68
69 //------------------------------Chunk------------------------------------------ 69 //------------------------------Chunk------------------------------------------
70 // Linked list of raw memory chunks 70 // Linked list of raw memory chunks
71 class Chunk: public CHeapObj { 71 class Chunk: public CHeapObj {
72 public: 72 public:
73 void* operator new(size_t size, size_t length); 73 void* operator new(size_t size, size_t length) throw();
74 void operator delete(void* p, size_t length); 74 void operator delete(void* p, size_t length);
75 Chunk(size_t length); 75 Chunk(size_t length);
76 76
77 enum { 77 enum {
78 init_size = 1*1024, // Size of first chunk 78 init_size = 1*1024, // Size of first chunk