Implement trivial `malloc` routine (Assembly)
- Dominant language
- C++
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**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](https://github.com/CodeusTech/Xita-AArch64/wiki/Register-Stacks#decoding-n-parameters) 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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.