Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » U++ Allocator & Vulkan
U++ Allocator & Vulkan [message #57461] Sat, 21 August 2021 17:47 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
I installed my Vulkan work on my Debian desktop and tried to compile the most basic code :

//#include <Core/Core.h>
#include <iostream>
#include <vulkan/vulkan.h>

int main(int argc, const char *argv[])
//CONSOLE_APP_MAIN
{
	VkInstance instance;
	VkApplicationInfo appInfo{};
    appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
    appInfo.pApplicationName = "Hello Triangle";
    appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
    appInfo.pEngineName = "No Engine";
    appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0);
    appInfo.apiVersion = VK_API_VERSION_1_0;

    VkInstanceCreateInfo createInfo{};
    createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
    createInfo.pApplicationInfo = &appInfo;
    createInfo.enabledExtensionCount = 0;
    createInfo.ppEnabledExtensionNames = nullptr;
    createInfo.enabledLayerCount = 0;

    if (vkCreateInstance(&createInfo, nullptr, &instance) != VK_SUCCESS) {
        #ifndef CORE_H
			std::cout << "Error\n";
        #else
			Upp::Cout() << "Error\n";
        #endif
    }else{
		vkDestroyInstance(instance, nullptr);
    }
}


A simple vulkan instance creation using default allocator. Here is my probblem:

If I include Core in my project without using USEMALLOC flag. This simple code result in memory leak :
https://i.imgur.com/7e7x4Gc.png
with USEMALLOC (or removing Core package) no problem happen.

From my knowledge, Vulkan, in order to work properly must have allocator that's aligned on 4 octet. May it's the reason of this error ?
 
Read Message
Read Message
Read Message
Previous Topic: set up ide minimize option when Execute (Ctrl + F5)
Next Topic: Refining IsNull(double)
Goto Forum:
  


Current Time: Mon Apr 29 03:41:09 CEST 2024

Total time taken to generate the page: 0.02831 seconds