Skip to content

Implement global memory arenas for the Win32 platform layer #408

@rdw-software

Description

@rdw-software

Details:

  • One small-ish global arena and a large one for per-frame allocations should be enough for now
  • The memory debug overlay can be used to visualize how much is allocated/committed/reserved
  • TBD: Not sure whether to reserve and commit later, looks like Windows does some magic otherwise?
  • TBD: Does it matter whether the base address of the transient arena is aligned? (Benchmark or defer)
  • TBD: I've experimented with protecting the arena but it may have some adverse affects (disabled settings)?
  • TBD: Does it make sense to use VirtualAlloc2 (new in Windows 10) over VirtualAlloc? (read the docs)
  • TBD: Is there any reason not to grab the maximum virtual address space (reserved, not committed - obviously)?
  • TBD: Should large address spaces (feature flag) be enabled, disabled, or ignored for the time being?

The allocation granularity is already stored as part of the CPU_PERFORMANCE_METRICS, but I don't know how relevant that will be.


References:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions