src/share/vm/runtime/handles.hpp

changeset 5103
f9be75d21404
parent 4967
5a9fa2ba85f0
child 5368
cf9d71d3e474
     1.1 --- a/src/share/vm/runtime/handles.hpp	Tue May 14 11:34:30 2013 +0400
     1.2 +++ b/src/share/vm/runtime/handles.hpp	Tue May 14 09:41:12 2013 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -281,7 +281,7 @@
    1.11  // across the HandleMark boundary.
    1.12  
    1.13  // The base class of HandleMark should have been StackObj but we also heap allocate
    1.14 -// a HandleMark when a thread is created.
    1.15 +// a HandleMark when a thread is created. The operator new is for this special case.
    1.16  
    1.17  class HandleMark {
    1.18   private:
    1.19 @@ -308,6 +308,11 @@
    1.20    void push();
    1.21    // called in the destructor of HandleMarkCleaner
    1.22    void pop_and_restore();
    1.23 +  // overloaded operators
    1.24 +  void* operator new(size_t size);
    1.25 +  void* operator new [](size_t size);
    1.26 +  void operator delete(void* p);
    1.27 +  void operator delete[](void* p);
    1.28  };
    1.29  
    1.30  //------------------------------------------------------------------------------------------------------------------------

mercurial