< prev index next >

src/hotspot/share/libadt/dict.cpp

Print this page
rev 52596 : [mq]: fix

*** 1,7 **** /* ! * Copyright (c) 1997, 2017, 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) 1997, 2018, 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.
*** 159,169 **** } // End of for all buckets } //------------------------------Dict----------------------------------------- // Deep copy a dictionary. ! Dict::Dict( const Dict &d ) : _arena(d._arena), _size(d._size), _cnt(d._cnt), _hash(d._hash), _cmp(d._cmp) { _bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size); memcpy( (void*)_bin, (void*)d._bin, sizeof(bucket)*_size ); for( uint i=0; i<_size; i++ ) { if( !_bin[i]._keyvals ) continue; _bin[i]._keyvals=(void**)_arena->Amalloc_4( sizeof(void *)*_bin[i]._max*2); --- 159,169 ---- } // End of for all buckets } //------------------------------Dict----------------------------------------- // Deep copy a dictionary. ! Dict::Dict( const Dict &d ) : ResourceObj(d), _arena(d._arena), _size(d._size), _cnt(d._cnt), _hash(d._hash), _cmp(d._cmp) { _bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size); memcpy( (void*)_bin, (void*)d._bin, sizeof(bucket)*_size ); for( uint i=0; i<_size; i++ ) { if( !_bin[i]._keyvals ) continue; _bin[i]._keyvals=(void**)_arena->Amalloc_4( sizeof(void *)*_bin[i]._max*2);
< prev index next >