equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2016, 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. |
358 // Auxiliary functions for scan_and_{forward,adjust_pointers,compact} support. |
358 // Auxiliary functions for scan_and_{forward,adjust_pointers,compact} support. |
359 inline size_t adjust_obj_size(size_t size) const { |
359 inline size_t adjust_obj_size(size_t size) const { |
360 return size; |
360 return size; |
361 } |
361 } |
362 |
362 |
363 inline size_t obj_size(const HeapWord* addr) const { |
363 inline size_t obj_size(const HeapWord* addr) const; |
364 return oop(addr)->size(); |
|
365 } |
|
366 |
364 |
367 public: |
365 public: |
368 CompactibleSpace() : |
366 CompactibleSpace() : |
369 _compaction_top(NULL), _next_compaction_space(NULL) {} |
367 _compaction_top(NULL), _next_compaction_space(NULL) {} |
370 |
368 |
506 |
504 |
507 inline bool scanned_block_is_obj(const HeapWord* addr) const { |
505 inline bool scanned_block_is_obj(const HeapWord* addr) const { |
508 return true; // Always true, since scan_limit is top |
506 return true; // Always true, since scan_limit is top |
509 } |
507 } |
510 |
508 |
511 inline size_t scanned_block_size(const HeapWord* addr) const { |
509 inline size_t scanned_block_size(const HeapWord* addr) const; |
512 return oop(addr)->size(); |
|
513 } |
|
514 |
510 |
515 protected: |
511 protected: |
516 HeapWord* _top; |
512 HeapWord* _top; |
517 HeapWord* _concurrent_iteration_safe_limit; |
513 HeapWord* _concurrent_iteration_safe_limit; |
518 // A helper for mangling the unused area of the space in debug builds. |
514 // A helper for mangling the unused area of the space in debug builds. |