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

Implement trivial malloc routine (Assembly) #80

Open
CodyFagley opened this issue Jul 20, 2021 · 0 comments
Open

Implement trivial malloc routine (Assembly) #80

CodyFagley opened this issue Jul 20, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@CodyFagley
Copy link
Member

CodyFagley commented Jul 20, 2021

IMPORTANT NOTE: As of v0.26.3, the content below is ONLY relevant for Raspberry Pi (3+)

Xita cross compiler is currently hung up on data types system, because the memory allocation system is not implemented in assembly. Types that exceed 8 bytes in size must dynamically allocate memory to hold the data.

To continue development of data types for the language, the compiler dev team needs an ARM assembly routine definition for a function called __xita_malloc.

Pseudo Workflow of __xita_malloc:

  • Decode 1 Parameter to determine the number of bytes requested be allocated.
  • Parse the tree of active memory nodes by checking memory address 0x40040000
  • Find the next available chunk of adequate size in general memory space (0x40041000 to 0xFFFFFFFF).
  • Store the Node in the tree of active memory nodes.
  • Replace the decoded parameter (number_bytes) with the address to the memory node data.
  • Clear the Serialization Register
@CodyFagley CodyFagley added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant