Allow allocators in testing (take 2)#2940
Allow allocators in testing (take 2)#2940IntegratedQuantum merged 6 commits intoPixelGuys:masterfrom
Conversation
IntegratedQuantum
left a comment
There was a problem hiding this comment.
Did you check if they are usable in testing?
|
One issue with that is that there is no difference between deallocating something with |
|
Yes, that is true, though that is technically also possible (to some degree) at runtime, since the stackAllocator uses the globalAllocator as a fallback. If it's trivial to fix, go for it, otherwise I'd say it's not worth the effort.
It leak-checks every test. |
Hm, then its not trivial to fix I think and its not really critical tbh. IMO out of scope for this PR. |
|
Alright, then I'm still waiting for an answer to my earlier question:
|
Right, I didn't push it; test "allocators" {
const allocation1 = stackAllocator.create(u64);
stackAllocator.destroy(allocation1);
const allocation2 = globalAllocator.create(u64);
globalAllocator.destroy(allocation2);
} |
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
This pull request default initializes `main.stackAllocator` and `main.globalAllocator` to testing allocator. Resolves: PixelGuys#1286 --------- Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
This pull request default initializes
main.stackAllocatorandmain.globalAllocatorto testing allocator.Resolves: #1286