investigating memory issues
Build / build (push) Successful in 1m5s
Test / build_and_test (push) Successful in 33m20s

This commit is contained in:
2026-05-06 15:54:59 +02:00
parent 538106cbba
commit a5ff640aeb
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -2,6 +2,7 @@ const std = @import("std");
const vk = @import("vulkan");
const SoftDevice = @import("SoftDevice.zig");
const base = @import("base");
const lib = @import("lib.zig");
const VkError = base.VkError;
@@ -12,6 +13,9 @@ interface: Interface,
data: []u8,
pub fn create(device: *SoftDevice, allocator: std.mem.Allocator, size: vk.DeviceSize, memory_type_index: u32) VkError!*Self {
if (size > lib.MAX_MEMORY_ALLOCATION_SIZE)
return VkError.OutOfDeviceMemory;
const self = allocator.create(Self) catch return VkError.OutOfHostMemory;
errdefer allocator.destroy(self);