Skip to content

Why does fusion mmap using MAP_FIXED? #12

Description

@rogerjxperi

I noticed that fusion mmaps shared memory using MAP_FIXED, like:
heap = mmap( addr_base, size + space, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, 0 );

This seems like a dangerous approach since MAP_FIXED will clear any memory already in that memory range. So unless you call DirectFBCreate very early during startup there is a chance that it will clear already mmap:ed memory, and at best cause a crash.

So, out of curiosity, why does fusion require that shared memory is allocated at a specific address that it gets from the fusion kernel module?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions