Skip to content
Commit 5f68d318 authored by Emil Velikov's avatar Emil Velikov
Browse files

xf86drm: rework drmGetDevices()



Do a once off memory allocation for each drmDevice.

This allows us to ease the error handling and simplify the
de-duplication loop. As part of this we need to rework drmFreeDevice()
such so that it frees the relevant hunks, rather than leaving that to
the caller.

Some memory stats from the drmdevice test

before: 22 allocs, 22 frees, 66,922 bytes allocated
after:   9 allocs, 9 frees, 66,436 bytes allocated

Signed-off-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6c88173f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment