Category : allocation

Windows 10, Visual Studio Community 2019 I am following https://vkguide.dev/docs/chapter-3/triangle_mesh_code/ and it mentions to add #include "vk_mem_alloc.h" and if you compile you will get linker errors. Then it describes that you should put #define VMA_IMPLEMENTATION above the include in the vk_engine.cpp. I understand how this works, and I have only included the define once in ..

Read more

I am using different types of data : say double *, double **, Eigen::Matrix< Index, Eigen::Dynamic, Eigen::Dynamic >, std::vector … I am using different codes, and they mix those types, so I would like to avoid copies of datas when passing from one type to another, e.g. say I have double * positions, and in ..

Read more

I have been following the vulkan tutorial, and I have noticed that Vulkan is not freeing all memory that is being allocated. The code below simply creates and destroys a Vulkan instance and overloads the new and delete operators to keep track of how many times memory is being allocated and freed. #define GLFW_INCLUDE_VULKAN #include ..

Read more

im new to c++ and im trying to understand how the "new" keyword works in c++ and when to use it , so i made this little program to test and see how the heap and stack works #include <iostream> #include <string> class Player { private: const std::string name; public: Player() : name("unknown") {} Player(const ..

Read more