Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle potential memory allocation fail #11

Open
cmarshall108 opened this issue Jul 20, 2019 · 0 comments
Open

Handle potential memory allocation fail #11

cmarshall108 opened this issue Jul 20, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request TODO Something that will be done

Comments

@cmarshall108
Copy link
Member

When trying to allocate memory using malloc, this can sometimes fail if the operating system does not have any available memory to allocate of the size specified. We should properly handle this and return a NULL pointer when trying to allocate structs and in some cases handle this through assertions. Right now this is being handled by the way of just assertions, which works but is not a preferred method of handling it for obvious reasons...

Reference:
https://github.com/AnythingTechPro/vulkan/blob/5a6027ed497f3e0d0d95050c27931861813e2fae/src/core/transaction.c#L63

@cmarshall108 cmarshall108 added enhancement New feature or request TODO Something that will be done labels Jul 20, 2019
@cmarshall108 cmarshall108 self-assigned this Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request TODO Something that will be done
Projects
None yet
Development

No branches or pull requests

1 participant