Skip to content

Improve capacity calculation in FileMappedResizableDirectMemory constructor #87

Description

@konard

Location: cpp/Platform.Memory/FileMappedResizableDirectMemory.h:35

Current code:

// TODO: cringe
ReservedCapacity(size > minimumReservedCapacity ? ((size / minimumReservedCapacity) + 1) * minimumReservedCapacity : minimumReservedCapacity);

Issue:
The current capacity calculation logic needs improvement. The TODO comment indicates the current implementation is suboptimal.

Suggestion:
Review and refactor the capacity calculation logic to be more readable and potentially more efficient.

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