Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Maestro Maestro
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • RiscOS
    • SSources
  • Apps
  • MaestroMaestro
  • Merge requests
  • !4

Closed
Created Feb 16, 2021 by Chris Wraight@cwraightDeveloper
  • Report abuse
Report abuse

Draft: Memory management

  • Overview 0
  • Commits 1
  • Changes 9

Each Maestro file is held in memory as nine blocks of bytes: one for 'Gate' data, and eight for Note information for each audio channel. Currently, Maestro reserves a very big WimpSlot of 720K, divides the space between the end of the program and the end of the Wimpslot by 9 to get equally spaced pointers for each byte block, and then writes data to them without any bounds checking. This is very wasteful (Maestro files are typically only 1-2K in size), and there's nothing to prevent a large file from running off the end of the Wimpslot and trampling over something else.

This merge request:

  • Adds a set of heap management procedures
  • Removes the existing memory management system, and holds all data in resizable heap blocks instead, with checks on overruns
  • Removes the RMEnsure check, which was only present because of Maestro's outsized WimpSlot request on older machines with less RAM

Admin: Tested on a variety of Maestro files. There's still plenty of inefficiency in the way Maestro handles its data, but with the largest file I could find, with Sprites11 loaded, the Wimpslot goes down to 380K.

Edited Feb 16, 2021 by Chris Wraight
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: MemoryManagement