hotspot/src/share/vm/memory/resourceArea.hpp
author ysr
Tue, 01 Jul 2008 11:59:44 -0700
changeset 1383 3a216aa862b7
parent 1 489c9b5090e2
child 5547 f4b087cbb361
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1997-2003 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
// The resource area holds temporary data structures in the VM.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
// The actual allocation areas are thread local. Typical usage:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
//   ...
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
//   {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
//     ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
//     int foo[] = NEW_RESOURCE_ARRAY(int, 64);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
//     ...
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
//   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
//   ...
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
//------------------------------ResourceArea-----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
// A ResourceArea is an Arena that supports safe usage of ResourceMark.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
class ResourceArea: public Arena {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  friend class ResourceMark;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  friend class DeoptResourceMark;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  debug_only(int _nesting;)             // current # of nested ResourceMarks
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  debug_only(static int _warned;)       // to suppress multiple warnings
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  ResourceArea() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
    debug_only(_nesting = 0;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  ResourceArea(size_t init_size) : Arena(init_size) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
    debug_only(_nesting = 0;);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  char* allocate_bytes(size_t size) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
#ifdef ASSERT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
    if (_nesting < 1 && !_warned++)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
      fatal("memory leak: allocating without ResourceMark");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    if (UseMallocOnly) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
      // use malloc, but save pointer in res. area for later freeing
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
      char** save = (char**)internal_malloc_4(sizeof(char*));
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
      return (*save = (char*)os::malloc(size));
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    return (char*)Amalloc(size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  debug_only(int nesting() const { return _nesting; });
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
//------------------------------ResourceMark-----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
// A resource mark releases all resources allocated after it was constructed
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
// when the destructor is called.  Typically used as a local variable.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
class ResourceMark: public StackObj {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  ResourceArea *_area;          // Resource area to stack allocate
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  Chunk *_chunk;                // saved arena chunk
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  char *_hwm, *_max;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  NOT_PRODUCT(size_t _size_in_bytes;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  void initialize(Thread *thread) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    _area = thread->resource_area();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
    _chunk = _area->_chunk;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
    _hwm = _area->_hwm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
    _max= _area->_max;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    NOT_PRODUCT(_size_in_bytes = _area->size_in_bytes();)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    debug_only(_area->_nesting++;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
    assert( _area->_nesting > 0, "must stack allocate RMs" );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
#ifndef ASSERT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  ResourceMark(Thread *thread) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
    assert(thread == Thread::current(), "not the current thread");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
    initialize(thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  ResourceMark(Thread *thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
#endif // ASSERT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  ResourceMark()               { initialize(Thread::current()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  ResourceMark( ResourceArea *r ) :
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    _area(r), _chunk(r->_chunk), _hwm(r->_hwm), _max(r->_max) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    NOT_PRODUCT(_size_in_bytes = _area->size_in_bytes();)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    debug_only(_area->_nesting++;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    assert( _area->_nesting > 0, "must stack allocate RMs" );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  void reset_to_mark() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    if (UseMallocOnly) free_malloced_objects();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    if( _chunk->next() )        // Delete later chunks
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
      _chunk->next_chop();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
    _area->_chunk = _chunk;     // Roll back arena to saved chunk
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    _area->_hwm = _hwm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
    _area->_max = _max;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
    // clear out this chunk (to detect allocation bugs)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
    if (ZapResourceArea) memset(_hwm, badResourceValue, _max - _hwm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
    _area->set_size_in_bytes(size_in_bytes());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  ~ResourceMark() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
    assert( _area->_nesting > 0, "must stack allocate RMs" );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
    debug_only(_area->_nesting--;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
    reset_to_mark();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  void free_malloced_objects()                                         PRODUCT_RETURN;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  size_t size_in_bytes()       NOT_PRODUCT({ return _size_in_bytes; }) PRODUCT_RETURN0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
//------------------------------DeoptResourceMark-----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
// A deopt resource mark releases all resources allocated after it was constructed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
// when the destructor is called.  Typically used as a local variable. It differs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
// from a typical resource more in that it is C-Heap allocated so that deoptimization
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
// can use data structures that are arena based but are not amenable to vanilla
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
// ResourceMarks because deoptimization can not use a stack allocated mark. During
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
// deoptimization we go thru the following steps:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
// 0: start in assembly stub and call either uncommon_trap/fetch_unroll_info
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
// 1: create the vframeArray (contains pointers to Resource allocated structures)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
//   This allocates the DeoptResourceMark.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
// 2: return to assembly stub and remove stub frame and deoptee frame and create
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
//    the new skeletal frames.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
// 3: push new stub frame and call unpack_frames
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
// 4: retrieve information from the vframeArray to populate the skeletal frames
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
// 5: release the DeoptResourceMark
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
// 6: return to stub and eventually to interpreter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
// With old style eager deoptimization the vframeArray was created by the vmThread there
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
// was no way for the vframeArray to contain resource allocated objects and so
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
// a complex set of data structures to simulate an array of vframes in CHeap memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
// was used. With new style lazy deoptimization the vframeArray is created in the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
// the thread that will use it and we can use a much simpler scheme for the vframeArray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
// leveraging existing data structures if we simply create a way to manage this one
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
// special need for a ResourceMark. If ResourceMark simply inherited from CHeapObj
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
// then existing ResourceMarks would work fine since no one use new to allocate them
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
// and they would be stack allocated. This leaves open the possibilty of accidental
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
// misuse so we simple duplicate the ResourceMark functionality here.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
class DeoptResourceMark: public CHeapObj {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  ResourceArea *_area;          // Resource area to stack allocate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  Chunk *_chunk;                // saved arena chunk
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  char *_hwm, *_max;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  NOT_PRODUCT(size_t _size_in_bytes;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  void initialize(Thread *thread) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    _area = thread->resource_area();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    _chunk = _area->_chunk;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
    _hwm = _area->_hwm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
    _max= _area->_max;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
    NOT_PRODUCT(_size_in_bytes = _area->size_in_bytes();)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
    debug_only(_area->_nesting++;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
    assert( _area->_nesting > 0, "must stack allocate RMs" );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
#ifndef ASSERT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  DeoptResourceMark(Thread *thread) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
    assert(thread == Thread::current(), "not the current thread");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
    initialize(thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  DeoptResourceMark(Thread *thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
#endif // ASSERT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  DeoptResourceMark()               { initialize(Thread::current()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  DeoptResourceMark( ResourceArea *r ) :
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
    _area(r), _chunk(r->_chunk), _hwm(r->_hwm), _max(r->_max) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
    NOT_PRODUCT(_size_in_bytes = _area->size_in_bytes();)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
    debug_only(_area->_nesting++;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
    assert( _area->_nesting > 0, "must stack allocate RMs" );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  void reset_to_mark() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
    if (UseMallocOnly) free_malloced_objects();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
    if( _chunk->next() )        // Delete later chunks
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
      _chunk->next_chop();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
    _area->_chunk = _chunk;     // Roll back arena to saved chunk
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
    _area->_hwm = _hwm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
    _area->_max = _max;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
    // clear out this chunk (to detect allocation bugs)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
    if (ZapResourceArea) memset(_hwm, badResourceValue, _max - _hwm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
    _area->set_size_in_bytes(size_in_bytes());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  ~DeoptResourceMark() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
    assert( _area->_nesting > 0, "must stack allocate RMs" );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
    debug_only(_area->_nesting--;)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
    reset_to_mark();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  void free_malloced_objects()                                         PRODUCT_RETURN;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  size_t size_in_bytes()       NOT_PRODUCT({ return _size_in_bytes; }) PRODUCT_RETURN0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
};