travisvroman / kohi

A game engine made as part of the Kohi Game Engine series on YouTube (and Twitch!), where we make a game engine from the ground up using C and Vulkan.

Home Page:https://kohiengine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Testbed crash when trying to allocate 1GB twice

Jaisiero opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

  1. Increase memory system at least to 3 GB in order to have enough space (in theory) to allocate 2GB (1GB each allocation). // Memory system must be the first thing to be stood up. memory_system_configuration memory_system_config = {}; memory_system_config.total_alloc_size = GIBIBYTES(3) + MEBIBYTES(512);
  2. Allocate 1GB twice with kallocate (if I try to allocate 512MB twice it works like a charm).
  3. The system is writing into a bad memory address.

Expected behavior
The dynamic allocator should be able to give you that amount of memory. Are we reaching some threshold? No error message at all in that case.

Screenshots
image

Desktop (please complete the following information):
Video/071 (#87)

Additional context
Trying to allocate some big buffers host-side seems like a found a bug in the dynamic allocator?

Cheers.

Hi again!
It seems like commit
Video/077.5 (https://github.com/travisvroman/kohi/pull/100[)](https://github.com/travisvroman/kohi/commit/784ebad990d8e6d6a1d90ea865c05a1e4a536152)
fixed the issue! Maybe was it in the freelist change? Anyway.

Thanks!