Giter Club home page Giter Club logo

pawn-3.2-plus's People

Contributors

agraber avatar amyrahmady avatar daniel-cortez avatar gitter-badger avatar maddinat0r avatar misiur avatar mschnitzer avatar oscar-broman avatar southclaws avatar spacemud avatar sysadminjeroen avatar vvwvv avatar y-less avatar yashassamaga avatar zeex avatar ziggi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pawn-3.2-plus's Issues

Memory mapping

Proposal/Question

Ever since I saw your improvements to the runtime, specifically the address checking, I wondered, whether you would consider adding/pulling memory-mapping to the runtime. The way I imagine it could work is, that when an instruction gets invalid address, it would first check, whether it is a mapped address before returning an error.

So for example, the upper 1GB of the amx address space could be used for mapping. So the mapping code would first chceck the two most significant bits and if they are not 11, the address is not in the upper 1 GB. So it would return an error.

Otherwise it would check the third most significant bit, if it was 0, it would use segmentation. So it would strip the three most significant bits from the amx address, compare it to the size of the mapped memory and if it is lower, it would add base pointer and use that address as physical adress.

If the third most significant bit was 1, it would use paging. It would use pages up to 64 kB large, allowing for 8192 pages. Each page would have 8 byte entry in its page table. 4 bytes would be the base address, 2 bytes would be flags and 2 bytes would be the size of the page. So the page table would take up 64 kB. 13 most significant bits (exluding the 3) would be the number of the page in the page table, the remaining 16 bits would be offset from the base of the page.

This would help with a lot of functionality, such as dynamic memory, shared memory, allowing better passing of arguments between amx files (instead of copying an array/string, you would temporarily map the array to the other amx), etc.

The flags would at least contain read permission, write permission, execute permission and possibly more advanced stuff, such as copy-on-write. They could also contain technical information, such as if this is the first page in a mapping.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.