Skip to content

memcheck_malloc() could check for alignment on DMA regions #256

Description

@reticulatedpines

memcheck_malloc() has the internal requires_dma flag. This comes from MEM_DMA flag. That presently means we may allocate from three pools: _alloc_dma_memory(), _shoot_malloc() or _srm_malloc().

_alloc_dma_memory() will align the returned block. This appears required for DMA ops, e.g. FIO family of functions. Do the other two pools have the same (or higher) alignment guarantees? If not, it will cause problems.

We could check that all alignment requirements of the caller are met. This may need a new per cam define, if alignment differs between gens or cams. Kitor thinks zico ops have alignment reqs on D67 but not D8 - if these differ from DMA reqs, we might need two constants per cam.

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