Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Iris Iris
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 171
    • Issues 171
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Iris
  • IrisIris
  • Merge requests
  • !439

heap_lang: support deallocation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ralf Jung requested to merge ci/ralf/dealloc into master May 07, 2020
  • Overview 62
  • Commits 13
  • Pipelines 18
  • Changes 15

This will fix #313 (closed) when it is ready. But it is still work-in-progress.

I am posting this to get some early feedback. The key issue to solve is remembering which locations were previously allocated so that we can ensure they do not get reallocated. This is necessary to keep the meta mechanism sound.

The approach I took now is to make the heap be of type gmap loc (option val), and None represents "deallocated". I think this is cleaner in terms of language specification than the alternative of tracking a gset loc of deallocated locations -- the latter would require an invariant to make sure no location can be both allocated and deallocated. However, a heap of (option val) makes gen_heap a bit awkward to use. It's not too horrible though, just see for yourself.

@robbertkrebbers what do you think?

Edited May 20, 2020 by Ralf Jung
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ci/ralf/dealloc