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

lcc: malloc, 64K support and memory control #66

Open
kervinck opened this issue May 9, 2019 · 4 comments
Open

lcc: malloc, 64K support and memory control #66

kervinck opened this issue May 9, 2019 · 4 comments

Comments

@kervinck
Copy link
Owner

kervinck commented May 9, 2019

At some point we like to add 64K support, and before that already malloc/free.

This leads to options on how to use the upper 32K. The most significant change is that data can become larger than 256 bytes, and this is a very desirable feature. But then segments start to work different for code and data: data can seamlessly cross page boundaries and code needs special treatment. Segmentation at page boundaries must still happen for the .gt1 file format. Under 32K, we could just ignore these differences between code and data.

Also the programmer will want to control the use of memory locations. Specifically those shared with screen memory.

Another idea is to have the heap already available at link time, and let the linker get its memory from there. At the end of the link process, the remainder of this heap can be placed in the GT1 file as static initialisation for the runtime malloc heap.

Many ideas...

@kervinck
Copy link
Owner Author

Low priority

@kervinck kervinck added the low label Jun 4, 2019
@jurkstas
Copy link

Is this what is necessary to store larger lookup tables as global constants?

@kervinck
Copy link
Owner Author

Indeed, it needs a new way to deal with segmentation.

@lb3361
Copy link
Contributor

lb3361 commented Aug 25, 2022

Suggesting to close this issue since glcc does this already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants