zephyr/subsys/cpp/cpp_vtable.cpp
Jan Van Winkel 8a98a67bf1 cpp: Use malloc/free instead of kernel variants in new/delete
Use malloc/free instead of k_malloc/k_free in operator new/delete
implementation or use libstdc++ implementation when available.

Further updated cpp_synchronization sample to enable minimal libc heap
as virtual destructor requires operator delete which depends on free.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-26 12:41:54 -06:00

27 lines
527 B
C++

/*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* @file
* @brief Stub for C++ virtual tables
*/
/**
*
* @brief basic virtual tables required for classes to build
*
*/
namespace __cxxabiv1 {
class __class_type_info {
virtual void dummy();
};
class __si_class_type_info {
virtual void dummy();
};
void __class_type_info::dummy() { } // causes the vtable to get created here
void __si_class_type_info::dummy() { } // causes the vtable to get created here
};