1 // Copyright 2020 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "src/heap/base-space.h" 6 7 namespace v8 { 8 namespace internal { 9 GetSpaceName(AllocationSpace space)10const char* BaseSpace::GetSpaceName(AllocationSpace space) { 11 switch (space) { 12 case NEW_SPACE: 13 return "new_space"; 14 case OLD_SPACE: 15 return "old_space"; 16 case MAP_SPACE: 17 return "map_space"; 18 case CODE_SPACE: 19 return "code_space"; 20 case LO_SPACE: 21 return "large_object_space"; 22 case NEW_LO_SPACE: 23 return "new_large_object_space"; 24 case CODE_LO_SPACE: 25 return "code_large_object_space"; 26 case RO_SPACE: 27 return "read_only_space"; 28 } 29 UNREACHABLE(); 30 } 31 32 } // namespace internal 33 } // namespace v8 34