You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
implement OwnedPhysicalMemory which deallocates physical memory on drop (#164)
* add OwnedPhysicalMemory which deallocates phys mem on drop
The OwnedPhysicalMemory is the logical pendant to the OwnedSegment,
with the difference that we assume that there is only one global
physical memory, so we don't need to worry about lifetimes and
back references to the allocator.
Upon allocation, such an owned object is handed out, and the caller
must keep it, leak it or drop it. If the caller decides to leak it (because for
example a third party library needs to take ownership over the memory -
see HalImpl in this commit), he is responsible for deallocation.
This design decision may or may not be beneficial for future decisions,
in part because it may be too simple or even incorrect.
* fix unnecessary dereference
* fix some compiler warnings that show up in my IDE
* fix some clippy warnings in tests
* run clippy with `--tests` in CI
* remove clone impl from OwnedPhysicalMemory
0 commit comments