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

const objects unable to allocate #1

Open
lyncmi07 opened this issue Apr 30, 2020 · 0 comments
Open

const objects unable to allocate #1

lyncmi07 opened this issue Apr 30, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@lyncmi07
Copy link
Owner

If an object is constant (Every version of the object is always exactly the same everytime its instantiated)
it will fail to allocate correctly in gc. This is due to an optimisation within the compiler which still simply copy the correct bytes into memory.
Because the _size variable within gc::object is being allocated prior to its actual initialisation, the compiler does not realise that this is not an accurate action to perform.

If at all possible, any changes to an object should be done after the object is initialised.

This needs to have an associated test

@lyncmi07 lyncmi07 added the bug Something isn't working label Apr 30, 2020
@lyncmi07 lyncmi07 changed the title const objects const objects unable to allocate Apr 30, 2020
@lyncmi07 lyncmi07 removed this from the Single Threaded Garbage Collector milestone Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant