diff --git a/runtime/src/main/cpp/Memory.cpp b/runtime/src/main/cpp/Memory.cpp index 17d5e245fbe..f51d4f22b6b 100644 --- a/runtime/src/main/cpp/Memory.cpp +++ b/runtime/src/main/cpp/Memory.cpp @@ -76,12 +76,12 @@ void InitMemory() { } // Now we ignore all placement hints and always allocate heap space for new object. -void* AllocInstance(const TypeInfo* type_info, PlacementHint hint) { +ObjHeader* AllocInstance(const TypeInfo* type_info, PlacementHint hint) { RuntimeAssert(type_info->instanceSize_ >= 0, "must be an object"); return ObjectContainer(type_info).GetPlace(); } -void* AllocArrayInstance( +ArrayHeader* AllocArrayInstance( const TypeInfo* type_info, PlacementHint hint, uint32_t elements) { RuntimeAssert(type_info->instanceSize_ < 0, "must be an array"); return ArrayContainer(type_info, elements).GetPlace(); diff --git a/runtime/src/main/cpp/Memory.h b/runtime/src/main/cpp/Memory.h index cdc3aeaf87f..21d85c44af2 100644 --- a/runtime/src/main/cpp/Memory.h +++ b/runtime/src/main/cpp/Memory.h @@ -263,8 +263,8 @@ extern "C" { #endif void InitMemory(); -void* AllocInstance(const TypeInfo* type_info, PlacementHint hint); -void* AllocArrayInstance( +ObjHeader* AllocInstance(const TypeInfo* type_info, PlacementHint hint); +ArrayHeader* AllocArrayInstance( const TypeInfo* type_info, PlacementHint hint, uint32_t elements); #ifdef __cplusplus }