Skip to content

Split/Compact memory without corrupting memory #5

@daneren2005

Description

@daneren2005

MemoryBuffer has the option to split or compact memory. We can't use it unless we can 100% guarantee that every thread will stop using memory the instant it is freed. ex: Allocate 16 bytes. Thread A frees that allocation and then allocates 12 bytes and 4 bytes, but Thread B is mid-execution on the old allocation can changes the internal state of the 4-byte allocation breaking everything. After the internal state is wrong MemoryBuffer will loose track of which blocks are where and how big they are.

Ideas

  • Delay frees until no thread is mid execution
  • Time delayed freeing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions